i have this
13
and I want to increment this number by +1 when I click a button
How can I do that
var jLikes = $('div.likes'); var sLikes = jLikes.text(); var nLikes = parseInt(sLikes); if(isNaN(nLikes)) { return; } jLikes.text(nLikes+1);