How to Disable Right Click Menu using JQuery?
Today, i am going to tell you how to disable mouse right click on div. this example thought you can learn how to disable right click on page or image or any html tag.
jquery provide contextmenu event that way we can prevent right click on specific html element. In this example i used contextmenu event with on().
So, let's see example code and check demo.
<title>Jquery - disable right click on div using context menu </title>
<div class="my-div" style="width:500px;height:500px;background:red"></div>
So, let's check.....
We are Recommending you
- How to Remove Empty or Null Values from JSON using JQuery?
- How to Remove Empty or Null Values from Array in JQuery?
- JQuery - How to Push Specific Key and Value in Array?
- How to Remove Duplicate Object from Array in JQuery?
- PHP JQuery Chosen Ajax Autocomplete Example
- How to Remove All Spaces from String in JQuery?
- How to Change Date Format in JQuery?
- JQuery Prevent Submit Form on Enter Key Except Textarea Example
- JQuery Animated Typing Effect using Typed JS Example
- How to Call AngularJS Controller Function in JQuery?
- PHP Crop Image Before Upload using Croppie JS Example
- PHP JQuery Select2 Ajax Autocomplete Example
- JQuery Datepicker Example using JQuery UI JS