Quantcast
Viewing latest article 3
Browse Latest Browse All 10

hide browser context menu -jquery

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 latest article 3
Browse Latest Browse All 10

Trending Articles