Unable to disable right click on images using JQuery -


i trying disable right click on images using jquery. have searched , found:

$('img').bind('contextmenu', function(e){     return false; });  

but doesnt work.

however, tried:

$('document').bind('contextmenu', function(e){     return false; });  

which work, disables right click on everything.

i tried $('document img') not work either.

is no longer possible new browsers? know of different way this?

(ps, running jquery 1.10.2)

you can keep function on document, , check event.target see element initiated event.

i don't recommend disabling this, annoying , easy pass.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -