Skip to content

Instantly share code, notes, and snippets.

@miketierney
Created February 3, 2011 22:13
Show Gist options
  • Save miketierney/810333 to your computer and use it in GitHub Desktop.
Save miketierney/810333 to your computer and use it in GitHub Desktop.
Some jQuery code that will capture a contextmenu event
// not sure how bulletproof this is, and you have to promise to only use this for good and never for evil.
$(document).bind("contextmenu", function(e) {
e.preventDefault();
alert("Contextmenu!");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment