I'm not able to increment the variable with each click on a button .
Example: Button and Paragraph , each time you click the button , increase the Paragraph , for example, from 0 to 1, and each click will increment one.
function criaCounter(init) {
var count = init || 0;
return function() {
count++;
alert(count);
}
}
$('#addCount').click(criaCounter(5));