我正在使用颜色框来显示一些图像。我用来调用图像的代码是:
jQuery(".ImgPop").colorbox({
opacity: 0.4,
rel: 'ImgPop',
iframe: false,
width: '770px',
height: '680px',
scalePhotos: true,
current: false
});
这工作正常并弹出我的图像,我可以在其中导航它们。
我的问题是在我调用上面代码的原始页面上,我有一个脚本可以防止使用代码右键单击图像:
$(document).ready(function(){
jQuery("img").bind("contextmenu",function(e){
alert('Images are Copyright of this site.');
return false;
});
});
此代码适用于我网站上除颜色框之外的所有内容。有什么方法可以将此脚本传递给颜色框,还是我做错了什么?