If you
want to disable right click event on page then a small piece of code will help
you out.
To
disable right click event we just need to bind the contextmenu event with the
document element and then use ‘e.preventDefault();’ in bind method or simply
return false from bind method.
jQuery
code to disable right click:
$(document).ready(function() {
$(document).bind("contextmenu", function(e) {
e.preventDefault();
});
});
Or you
can use:
$(document).ready(function() {
$(document).bind("contextmenu", function(e) {
return false;
});
});
|
Comments
Post a Comment