I'm currently using Shadowbox.js to my gallery and I want to disable the right click when the visitor views the image in full size. How can I accomplish this?
Thanks in advance.
I'm currently using Shadowbox.js to my gallery and I want to disable the right click when the visitor views the image in full size. How can I accomplish this?
Thanks in advance.
You can do the following to specifically target Shadowbox.js and leave the context menu intact on the rest of the page.
$(function(){
$('#sb-wrapper').on('contextmenu', function(){return false;});
});
$(function(){
$('#sb-wrapper').live('contextmenu', function(){return false;});
});
//Should be executed as part of the window.onload method
document.getElementById('sb-wrapper').oncontextmenu = function(){return false;}
Execute the Native statement in the Chrome's console on http://www.shadowbox-js.com/