Skip to content

Instantly share code, notes, and snippets.

@jamiehs
Created October 8, 2012 20:24
Show Gist options
  • Save jamiehs/3854745 to your computer and use it in GitHub Desktop.
Save jamiehs/3854745 to your computer and use it in GitHub Desktop.
Click Timer for jQuery
$('#my_awesome_element').click(function(event){
var element = this;
if (this.timer) clearTimeout(element.timer);
this.timer = setTimeout(function(){
console.log("Nothing Pressed for 1000ms");
},1000);
return true;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment