Created
February 7, 2011 20:25
-
-
Save hdragomir/815116 to your computer and use it in GitHub Desktop.
How to block normal click, but let middle (or control-, command- and shift- ) clicking pass through.
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
$('.some-snazzy-selector').click(function(ev){ | |
if( ev.which == 2 || ev.metaKey || ev.ctrlKey || ev.shiftKey ){ | |
return true; | |
} | |
// Ajax Magic here | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment