Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(element)
- .data('counter', 0) // begin counter at zero
- .click(function() {
- var counter = $(this).data('counter'); // get
- $(this).data('counter', counter + 1); // set
- // do something else...
- });
Add Comment
Please, Sign In to add comment