jQuery find ID of clicked button by class
With jQuery object (not necessary)
$(".vote").click(function(){
var id = $(this).attr('id');
});
Without jQuery object (faster)
$(".vote").click(function(){
var id = this.id;
});
$(".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.