How to Disable right click using jQuery

You can find many java script code snippets to disable right click. But jQuery makes our life easy. Below jQuery code disables the right click of mouse.
$(document).ready(function(){
    $(document).bind("contextmenu",function(e){
        return false;
    });
});
See live Demo and Code
We just need to bind the contextmenu event with the document element.

Method 2 (Send from one of the reader):
$(document).ready(function(){
    $(document).bind("contextmenu",function(e){
        e.preventDefault();
    });
});
Feel free to contact me for any help related to jQuery. I will gladly help you.
SHARE

Nothing shocks me, I'm a Software Engineer. And I am not young enough to know everything. I live in World Wide Web and from there take care of this website. This website communicates about my work, learning and experience. I believe life is short, and it is for loving, sharing, learning and connecting. So lets connect..