count(not work)
$(function(){ $("#counter").on("click",function(){ var count = 0; count++; alert(count); }); });