Quantcast
Channel: web development tutorials » jquery
Viewing all articles
Browse latest Browse all 10

hide browser context menu -jquery

$
0
0

Hide the web browser context menu with jquery

Sometimes we need to prevent the context menu from the browser when user right clicks on the element . for example preventing the user from saving image from application,viewing the source code of the web page.
it is very simple to do that using jquery with “contextmenu” event

jQuery().ready(function(){
jQuery('img').bind('contextmenu',function(){return false;});
});

In the above example we disabled context menu on the images by saving. we can see this demo on my previous post about the jquery mouse gestures.


Viewing all articles
Browse latest Browse all 10

Trending Articles