Use jQuery To Disable Right Clicking On Your Page

Let me be clear about one thing before we begin. I think that doing this is obnoxious. If you really think you can achieve something by stopping right clicking, you are wrong. If someone wants to get to something on the right click, they will find a way around it.

Having said that, jQuery makes it extremely easy to disable right clicking on your pages. All you have to do is enter the following code:


$(document).ready(function(){
  $(document).bind("contextmenu",function(e){
    return false;
  });
});

Leave a Reply

Your email address will not be published. Required fields are marked *