How to disable mouse right click using jQuery?

 Posted by vishalneeraj-24503 on 7/2/2014 | Category: jQuery Interview questions | Views: 530 | Points: 40
Answer:

First, include the jQuery library in head section like below:-
<script src = "Jquery-1.8.0.min.js" type = "text/JavaScript"></script>

Now write below code:-
<script type="text/JavaScript">

$(function()
{
$(this).bind(“contextmenu”, function(e)
{
e.preventDefault();
});

});
</script>


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response