Hi Dev,
Today, we will show you disable right click menu using jQuery example. This article will give you simple example of disable right click menu using jQuery example. Let’s discuss disable right click menu using jQuery example. In this article, we will implement a disable right click menu using jQuery example.
So let’s follow few step to create example of disable right click menu using jQuery example.
Example
<html lang="en"> <head> <title>Jquery - disable right click on div using context menu </title> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script> </head> <body> <div class="container"> <div class="my-div" style="width:500px;height:500px;background:red"></div> </div> <script type="text/javascript"> $(document).ready(function() { $(".my-div").on("contextmenu",function(){ return false; }); }); </script> </body> </html>
I hope it will assist you…