2012-03-28, 18:25:44
Zegnåt Wrote:I went and downloaded this plugin to try some things.
Should work. If you only want to block right-clicking the opened Fancybox images you can use this instead:Code:$(function(){
$(document).on('contextmenu', 'img', function(){ return false; });
});
But you will need to include your own jQuery in the theme. I18N Gallery includes jQuery 1.4.3, while my code was written for the latest version: 1.7.1.Code:$(function(){
$(document).on('contextmenu', '#fancybox-img', function(){ return false; });
});
The older versions of jQuery did not support .on(), but this effect can still be reached in 1.4.3 with the following code:
Code:$(function(){
$(document).delegate('#fancybox-img', 'contextmenu', function(){ return false; });
});
Lysande!
Got it working now - thanks for pointing out the jQuery, I had my own jQuery in theme but not quite the latest. I guess that's why none of the other solutions worked? Anyway, changed to 1.7.1 and everything works like charm. Thank you!