Disable right click in html page using jQuery

Last updated : May 10, 2017

Posted by: Rahul Chauhan

We can disable or prevent right click in HTML page using jQuery.

bind() method jQuery

The bind() method attaches one or more event handlers for selected elements and specifies a function to run when the event occurs.

Here we have attached bind() method with current HTML document.


<!DOCTYPE html>




<script type="text/javascript" src="../js/jquery-3.2.1.min.js"></script>



<h1>Disable right click in html page using jquery.</h1>


$(document).bind("contextmenu",function(e) {

return false;