Created
August 29, 2013 21:51
-
-
Save sTiLL-iLL/6383878 to your computer and use it in GitHub Desktop.
click checker
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
// figure out which click is left or right | |
$(element).live('click', function(e) { | |
if( (!$.browser.msie && e.button == 0) || ($.browser.msie && e.button == 1) ) { | |
alert("Left Button"); | |
} | |
else if(e.button == 2) | |
alert("Right Button"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment