jquery animate bug,仅限谷歌浏览器

时间:2012-02-15 12:42:32

标签: jquery jquery-ui google-chrome jquery-animate

显然,我的代码在所有浏览器中运行良好,包括谷歌crome出现问题。

我正在使用jquery .animate函数来创建某种幻灯片...当我点击左键时,包含图像的框会向右滑动,当我按下右键时,框会向左滑动...

对于这个问题,只有在crome上,动画韭菜性能非常好,动画的结束位置不正确,右侧的动画导致异常跳跃...我不知道crome在那里做什么..

我在两台不同的计算机上测试了这个问题,而我的一位朋友告诉我,他的Chrome没有动画问题......

这是一个代码示例:

$('#stpa_arrow_left').bind({
    click: function(e) {

        e.preventDefault();

        $('#stpa_imgBoardBox').children().animate({"left": "+=186px"}, "slow", function() {
            $(this).stop(true);
        }); 
    }
});

$('#stpa_arrow_right').bind({
    click: function(e) {

        e.preventDefault();

        $('#stpa_imgBoardBox').children().animate({"left": "-=186px"}, "slow", function() {
            $(this).stop(true);
        });
    }
});

这是一个实例(我正在研究的尚未完成的项目) - 它是带有左右箭头的中心框... www.united-travellers.at/pre-login/index.php

1 个答案:

答案 0 :(得分:1)

你只需要使用最新的jquery。这个错误已经修复。