Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jquery内容滑块,控制速度?_Jquery_Slider - Fatal编程技术网

jquery内容滑块,控制速度?

jquery内容滑块,控制速度?,jquery,slider,Jquery,Slider,我使用的是非常轻的jquery内容滑块,但不知道如何控制动画的速度。目前速度非常快,我需要放慢速度。我担心jquery对我来说是一个新领域,尽管我尝试了几种方法,但还是无法让它工作。任何帮助都将受到极大的感谢。这是我的密码: $(document).ready(function (){ $('#button a').click(function(){ var integer = $(this).attr('rel'); $('#myslide .cover

我使用的是非常轻的jquery内容滑块,但不知道如何控制动画的速度。目前速度非常快,我需要放慢速度。我担心jquery对我来说是一个新领域,尽管我尝试了几种方法,但还是无法让它工作。任何帮助都将受到极大的感谢。这是我的密码:

$(document).ready(function (){
    $('#button a').click(function(){
        var integer = $(this).attr('rel');
        $('#myslide .cover').animate({left:-960*(parseInt(integer)-1)})
        $('#button a').each(function(){
            $(this).removeClass('active');
            if($(this).hasClass('button'+integer)){
                $(this).addClass('active')
            }
        }); 
    });
});

下面是.animate jQuery语法。1000ms==1秒,将数字更改为taste。

您必须添加一个参数,例如:

.animate({left:-960*(parseInt(integer)-1)},5555)

css将在5555毫秒后获得。

。这么简单。谢谢。它一直在倒计时说‘你可以在5分钟内接受这个’!我现在已经做了。再次谢谢你,太好了。这么简单。非常感谢。
.animate({left:-960*(parseInt(integer)-1)},5555)