$(".vote").click(function(){ var id = this.id;});
The ID is accessible directly from the element. There's absolutely no need to use a jQuery method.
With jQuery object (not necessary)
$(".vote").click(function(){ var id = $(this).attr('id');});
Without jQuery object (faster)
i think this also work
$("body").on("click",".vote",function(){ var id = this.id; });