JQuery Colorbox 在 IE8 中不会关闭

标签 jquery internet-explorer-8 colorbox

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

最佳答案

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

关于JQuery Colorbox 在 IE8 中不会关闭,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11145948/

相关文章:

internet-explorer-8 - li 中使用 IE8 的动态宽度背景

JQuery 颜色框 : Resize very large image to given size

javascript - 如何将 json 字符串转换为特定格式?

javascript - HTML5、文件 API 和 jQuery 发布图片

javascript - jQuery .height() 在 div 上输出与 .scrollHeight 相同的值并溢出 :auto (IE8)

css - IE 会修改图像的颜色吗?

javascript - 将 JavaScript 'this' 设置为单击时的元素

jquery - 具有不在列表中的默认值的下拉列表选项

javascript - 如何将变量从 iframe 传递到父窗口?

jquery - 在窗口大小调整时调整 Colorbox 大小