Disable Right Click with jQuery

/ Published in: jQuery
Save to your folder(s)

Not a good practice, but may be useful for some applications. Maybe render a custom context menu instead of disabling it fully.

Copy this code and paste it in your HTML
  1. $(function() {
  2. $(this).bind("contextmenu", function(e) {
  3. e.preventDefault();
  4. });
  5. });

URL: http://www.devcurry.com/2009/11/disable-right-click-easily-using-jquery.html

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.