Created
April 28, 2015 15:30
-
-
Save csharpforevermore/7c420f6e147b48b89598 to your computer and use it in GitHub Desktop.
get element being clicked
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 clicky; | |
$(document).mousedown(function (e) { | |
// The latest element clicked | |
clicky = $(e.target); | |
}); | |
$(selector).mouseup(function (e) { | |
clicky = null; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment