在IE中缓慢的jQuery动画

Phi*_*son 3 jquery animation internet-explorer

我有一个网站http://www.special4you.co.uk,并有一个由气球制作的动画导航.这在FF和Chrome中看起来很漂亮,但在所有的IE中,它看起来很不错,因为动画效果很差且呈锯齿状.有谁知道为什么这个或者如果这是我的错?

我的代码是:

$(document).ready(function(){
    Cufon.replace('h1, p, #address, h2');
    $(".balloon-nav").hover(function(hoverEvent) {
        $("a.balloon-nav").click(function(clickEvent, hoverEvent){
            clickEvent.stopPropagation();
            var element = $(this);
            var target = element.attr("href");
            var zIndex = element.css("z-index");
            element.attr("href", "#").css("z-index", "100");
            element.animate({ top: "0" }, 1500, 'easeOutBounce', function() {
                element.css("z-index", zIndex);
                window.location=target;
            });
        });
        var e = this;
        $(e).animate({ marginTop: "-14px" }, 250, function() {
            $(e).animate({ marginTop: "-10px" }, 250);
        });
    },function(){
        var e = this;
        $(e).animate({ marginTop: "4px" }, 250, function() {
            $(e).animate({ marginTop: "0px" }, 250);
        });
    }); 
});
Run Code Online (Sandbox Code Playgroud)

fms*_*msf 5

这不是你的错,Internet Explorer很慢,你必须忍受这一点,直到微软做了一些事情.

它运行缓慢,因为你在很短的时间内有很多CSS更改,也许如果你降低IE的更新量可能会有所帮助.