- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to disable right click using jQuery?
To disable right click on a page, use the jQuery bind() method.
Example
You can try to run the following code to learn how to disable right click:
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $(document).bind("contextmenu",function(e){ return false; }); }); </script> </head> <body> <p>Right click is disabled on this page.</p> </body> </html>
- Related Articles
- How to handle a mouse right click event using jQuery?
- How to create right click using selenium?
- How to disable copy content function using jQuery?
- How to globally disable an animation using jQuery?
- How to handle a link click event using jQuery?
- How to handle a double click event using jQuery?
- How to submit a form using jQuery click event?
- How to perform right click using Selenium ChromeDriver?
- How to enable and disable submit button using jQuery?
- How to enable the “disabled” attribute using jQuery on button click?
- How to disable right-clicking on a website using JavaScript?
- How to Implicitly mimic click() in jQuery?
- How to disable/ enable checkbox with jQuery?
- How to add a class on click of anchor tag using jQuery?
- How to click anywhere on the page except one element using jQuery?

Advertisements