Chrome加载jQuery动画时出现问题

问题描述 投票:0回答:1

我在chrome中使用简单的jQuery动画时遇到了一些麻烦。它是在第一次加载浏览器时发生的。第一个div(id = rijbewijs),顶部的蓝色条,动画有时会被跳过并且根本不会出现。我想也许Chrome会跳过这个,因为它仍在忙于加载其他图像。它不会一直发生,主要是第一次加载时。

其他浏览器我没有注意到这个bug,我看到早期版本的jQuery中有一些带有animate函数的问题,但这似乎不是同一个问题。

我的代码:

$('document').ready(function(){
     $('#rijbewijs').css({
        'left':'-600px'
      })

     $('#proefles, #tweeuurles').css({
        'left':'700px'
      });

    $('#main img').ready(function(){
            $('#headerBackground').show();
            $('#headerBackground, #main img').fadeIn(600,function(){
                $('#rijbewijs').delay(750).animate({
                    'left':'0'
                }, 500);

                $('#proefles').delay(1750).animate({
                    'left':'175'
                }, 500);

                $('#tweeuurles').delay(2500).animate({
                    'left':'209'
                }, 500);
            });
    });
});

在这里看到它http://www.rijschool-rijles.nl/in/amsterdam

有人解决方案吗?

jquery google-chrome jquery-animate
1个回答
0
投票

我的坏:$('document')应该是$(文件)。

© www.soinside.com 2019 - 2024. All rights reserved.