Posted By

Jamie on 07/15/10


Tagged

jquery click timer


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

jackkeller
legacye
wattsupnow
rijnbeek


Click Timer For jQuery


 / Published in: jQuery
 

  1. $('#my_awesome_element').click(function(event){
  2. var element = this;
  3. if (this.timer) clearTimeout(element.timer);
  4. this.timer = setTimeout(function(){
  5. console.log("Nothing Pressed for 1000ms");
  6. },1000);
  7. return true;
  8. });

Report this snippet  

You need to login to post a comment.