简体   繁体   English

IE9默认为IE7,javascript错误

[英]IE9 Defaulting to IE7, javascript bug

I have this javascript that seems to be forcing IE9 into computability mode and forcing it to IE7. 我有这个JavaScript,似乎在迫使IE9进入可计算性模式并将其强制为IE7。 There are other areas of the website working properly that do not have this javascript code working on them, which leads me to believe something in this script is not compatible with IE9/IE7. 该网站的其他区域无法正常运行,没有使用此javascript代码,这使我相信此脚本中的某些内容与IE9 / IE7不兼容。

Basically, the code creates a pop up box when your mouse hovers over it. 基本上,代码将鼠标悬停在弹出框上。 However if the pop up box displays over an image, the image shows through the pop up box as if it has precedence. 但是,如果弹出框显示在图像上方,则该图像通过弹出框显示,就好像它具有优先级一样。 I have tried changing the z-index on that div but no luck. 我试过更改该div上的z-index,但是没有运气。

Any suggestions? 有什么建议么?

            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

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM