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