Current jQuery Being used
$("#like_button").live("click", function(){
var status = $(this).data("status");
var id = $(this).data("id");
var count = $(this).html();
if(status === 1){
like(id);
$(this).removeClass("likes");
$(this).addClass("liked");
count++;
$(this).html(count);
}elseif(status === 2){
like(id);
$(this).removeClass("liked");
$(this).addClass("likes");
count--;
$(this).html(count);
} else {
// do nothing
}
return false;
});
The Error
Uncaught SyntaxError: Unexpected token { (Line 529)
Which is this line below,
}elseif(status === 2){
If you need anymore information to help me with this please be sure to ask.
JavaScript uses
else if, notelseif.