我们在网站上的一些地方使用了jQuery ColorBox,人们无法在IE8中关闭弹出窗口。在Firefox中运行良好。任何帮助都将不胜感激!谢谢你,艾米(jQuery菜鸟)
相册页面示例:http://matsinc.com/photogallery/woven-vinyl-flooring
以下是相册页面上的代码:
<script type="text/javascript">
$j(document).ready(function() {
// Tool Tip
//$("a[title]").tooltip({ effect: 'slide'});
var cb_height = '566px';
if ($j.browser.msie && !$j.support.opacity) {
if ($j.browser.version == 7) {
cb_height = '598px';
}
}
var cb_html = '<div class="cbox-gallery"><h2></h2><img src="" alt="" /><div class="cbox-footer2"><a target="_blank" href="http://www.miprojectlibrary.com">Visit MI Project Library</a><br />Collect, distribute and download high resolution photos and swatches.</div></div>';
//colorbox for Photo Gallery
$j("a[rel='cb-gallery']").colorbox({
opacity: 0.5,
current: '{current} of {total}',
close: 'Close',
html: cb_html,
height: cb_height,
scrolling: false,
onComplete: function() {
var title = $j(this).attr('title');
var img = $j(this).attr('href');
$j('.cbox-gallery h2').text(title);
$j('.cbox-gallery img').attr({
'src': img,
'alt': title
});
$j('.cbox-gallery .download').attr('href', img);
//$.colorbox.resize();
}
});
});
</script>发布于 2012-09-18 23:05:12
对于我来说,它也没有在IE8上关闭,我使用的是colorbox 1.3.20和jQuery1.7.1,我将jquery升级到了1.8.1,现在它在IE8上关闭:)
发布于 2012-06-22 04:28:35
我会说把jQuery升级到1.4.3+或者把colorbox降级到1.3.18。
From the colorbox page,它说明您当前版本的colorbox (1.3.19)是使用jQuery 1.4.3+测试的,而您使用的是1.4.2。
当前版本: 1.3.19 (在麻省理工学院许可证下发布| Github | Changelog )
测试环境:火狐、Safari、Chrome、in 6、7、8、9、Opera11中的jQuery 1.4.3+。对于旧版本的jQuery (1.3.2+),请使用1.3.18版本
从IE8查看时,我收到一个jquery错误

https://stackoverflow.com/questions/11145948
复制相似问题