Created
February 12, 2013 17:25
-
-
Save joeyespo/4771521 to your computer and use it in GitHub Desktop.
Please, support "open link in new tab" when handling <a> clicks!
This file contains 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
$(element).click(function(e) { | |
// Allow the link to act normally when middle-clicking | |
// or clicking with a modifier key | |
if (e.which !== 1 || e.shiftKey || e.ctrlKey || e.altKey) { | |
return true; | |
} | |
// --YOUR CODE-- | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment