Disabling right click
-
Hi
Really hope you can help with this as the plugin is great and I want to use it very much. The site I am building is for photographers and as a rule they are all paranoid about having their images stolen. (I should know as I am one too.) I know disabling the right click does nothing to prevent anyone with the most basic understanding of html, but the point is not to make it so easy people think “Well why not, just this once, since all I have to do is right click and Save As…”.
So I am trying to disable the right click when an image has been opened in fancybox overlay. The jQuery code I am using is
$('.fancybox').fancybox({ onComplete: function() { $('fancybox-img').bind('contextmenu',function(e){ alert("Right-click menu disabled to prevent image copying"); return false; }); } });
I am a novice with jQuery so not really sure what I’m doing wrong. Tried various variations of the above but it seems that it’s just not picking up the onComplete event (or any event that I try).
You can see how I’m tyring to use it at https://www.ratedfotos.com or for a simple example that isn’t triggered by a slider at https://www.ratedfotos.com/test-page/
Any pointers would be massively appreciated!
Thanks
Jon
- The topic ‘Disabling right click’ is closed to new replies.