IE9默认为IE7,javascript bug

时间:2013-11-18 17:39:01

标签: javascript jquery css internet-explorer-7 internet-explorer-9

我有这个javascript似乎迫使IE9进入可计算模式并强制它进入IE7。网站的其他区域正常工作,没有这个javascript代码工作,这让我相信这个脚本中的东西与IE9 / IE7不兼容。

基本上,当鼠标悬停在代码上时,代码会创建一个弹出框。但是,如果弹出框显示在图像上,则图像通过弹出框显示,就好像它具有优先权一样。我试过改变那个div上的z-index但没有运气。

有什么建议吗?

            jQuery('.bubbleInfo').each(function () {

                if(jQuery.trim(jQuery(this).find('#dpop').html()) != ''){ // start

                    var totalHeight = jQuery(this).height();

                    var distance = 15;
                    var time = 250;
                    var hideDelay = 150;

                    var hideDelayTimer = null;

                    var beingShown = false;
                    var shown = false;
                    var trigger = jQuery('.trigger', this);
                    var info = jQuery('.popup', this).css('opacity', 0);


                    jQuery([trigger.get(0), info.get(0)]).mouseover(function () {
                    if (hideDelayTimer) clearTimeout(hideDelayTimer);
                    if (beingShown || shown) {
                        // don't trigger the animation again
                        return;
                    } else {
                        // reset position of info box
                        beingShown = true;

                        info.css({
                        top: (totalHeight+38),
                        left: -77,
                        display: 'block'd
                        }).animate({
                        top: '-=' + distance + 'px',
                        opacity: 1
                        }, time, 'swing', function() {
                        beingShown = false;
                        shown = true;
                        });
                    }

                    return false;
                    }).mouseout(function () {
                    if (hideDelayTimer) clearTimeout(hideDelayTimer);
                    hideDelayTimer = setTimeout(function () {
                        hideDelayTimer = null;
                        info.animate({
                        top: '-=' + distance + 'px',
                        opacity: 0
                        }, time, 'swing', function () {
                        shown = false;
                        info.css('display', 'none');
                        });

                    }, hideDelay);

                    return false;
                    });

                } // end

1 个答案:

答案 0 :(得分:0)

IE<虽然IE10支持jquery的所有版本,但是在jquery库版本中有10个问题。