Slow jQuery animation in IE

I have a website http://www.special4you.co.uk and have animated navigation made from balloons. It works and looks beautiful in FF and Chrome, but in all IE it looks like pants, because the animation is bad and uneven. Does anyone know why this is or if it is my fault?

my code is:

$(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);
        });
    }); 
});
+3
source share
2 answers

This is not your mistake, Internet Explorer is slow, you will have to live with it until Microsoft does nothing.

It works slowly because you have a lot of CSS changes in a short amount of time, perhaps if you reduce the number of updates for IE, this may help.

+4

doctype HTML 4 HTML 3.2.

-, html 3.2 IE, html 4.0 IE. , html 3.2 4.0. html 4.0 IE. , 3,2 , 4.0 ( IE).

0

Source: https://habr.com/ru/post/1730566/


All Articles