I have the number $likes_number in a div block on my page. I would like to know how to increment it dynamically by clicking on a button?
$likes_number
My code
$('#like').click(function() { $('#likes span').text( parseInt($('#likes span').text()) + 1 ); });
You can see an example here: http://jsfiddle.net/nayish/GCvnH/