IE9默认为IE7,javascript错误



我有一个javascript,它似乎正在迫使IE9进入可计算性模式,并迫使它进入IE7。网站的其他部分工作正常,但没有这个javascript代码,这让我相信这个脚本中的某些内容与IE9/IE7不兼容。

基本上,当鼠标悬停在弹出框上时,代码会创建一个弹出框。但是,如果弹出框显示在图像上,则图像会通过弹出框显示,就好像它有优先权一样。我曾尝试更改该div的z索引,但没有成功。

有什么建议吗?

            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

IE<10在jquery库版本中存在问题,尽管IE10支持jquery的所有版本。

最新更新