Created
April 19, 2013 21:21
-
-
Save teaholiday89/5423316 to your computer and use it in GitHub Desktop.
jquery detect if event happened
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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