Skip to content

Instantly share code, notes, and snippets.

@teaholiday89
Created April 19, 2013 21:21
Show Gist options
  • Save teaholiday89/5423316 to your computer and use it in GitHub Desktop.
Save teaholiday89/5423316 to your computer and use it in GitHub Desktop.
jquery detect if event happened
var eventClick = null;
$("a").click(function() {
if (this === eventClick) {
alert("You've clicked this element twice.");
}
eventClick = this;
return false;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment