To count button clicks in Javascript you can use the following snippet.
Sample Javascript
$('myButton')
.data('counter', 0)
.click(function() {
var counter = $(this).data('counter');
$(this).data('counter', counter + 1);
alert($(this).data('counter'));
});
RT @CodeSnippetsNET: How to count button clicks in #Javascript http://t.co/GbJWWC7NiR #js #php #html #css #coding
RT @CodeSnippetsNET: How to count button clicks in #Javascript http://t.co/GbJWWC7NiR #js #php #html #css #coding