【问题标题】:JQuery Colorbox Won't Close in IE8JQuery Colorbox 不会在 IE8 中关闭
【发布时间】:2012-06-21 20:08:48
【问题描述】:

我们在我们网站的一些地方使用了 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>

【问题讨论】:

    标签: jquery internet-explorer-8 colorbox


    【解决方案1】:

    对我来说,它也没有在 IE8 上关闭,我使用的是 colorbox 1.3.20 和 jquery 1.7.1,我将 jquery 升级到 1.8.1,现在它在 IE8 上关闭了 :)

    【讨论】:

      【解决方案2】:

      我会说将 jQuery 升级到 1.4.3+ 或将颜色框降级到 1.3.18。

      From the colorbox page,它表明您当前版本的颜色框​​ (1.3.19) 已使用 jQuery 1.4.3+ 进行了测试,并且您使用的是 1.4.2。

      当前版本:1.3.19(根据 MIT 许可 | Github | Changelog 发布)

      测试于:Firefox、Safari、Chrome、Internet Explorer 6、7、8、9、Opera 11 中的 jQuery 1.4.3+。 对于旧版本的 jQuery (1.3.2+),请使用 1.3.18 版本

      从 IE8 中查看时出现 jquery 错误

      【讨论】:

        猜你喜欢
        • 2011-09-30
        • 2012-01-29
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-02-21
        • 1970-01-01
        相关资源
        最近更新 更多