Jquery Cool Carousel左菜单导航功能,带自动滚动功能,无输出延迟
嗨,我需要整合酷转盘到我的网站。但我需要用左右导航激活自动滚动。但目前,当我激活自动滚动功能,并没有延迟,然后左,右导航被禁用。它不起作用。因此,我如何将左、右导航功能与自动滚动功能集成在一起,而无需延迟。或者向我推荐一些具有此功能的旋转木马。 现在我做了一个代码来做这个动作,强制完全覆盖,但在那个里,右箭头导航正常,但左箭头导航不正常。我在这里附上我的密码Jquery Cool Carousel左菜单导航功能,带自动滚动功能,无输出延迟,jquery,carousel,Jquery,Carousel,嗨,我需要整合酷转盘到我的网站。但我需要用左右导航激活自动滚动。但目前,当我激活自动滚动功能,并没有延迟,然后左,右导航被禁用。它不起作用。因此,我如何将左、右导航功能与自动滚动功能集成在一起,而无需延迟。或者向我推荐一些具有此功能的旋转木马。 现在我做了一个代码来做这个动作,强制完全覆盖,但在那个里,右箭头导航正常,但左箭头导航不正常。我在这里附上我的密码 var $imgWidth1 = $('#carousel1 .car-div').first().outerWidth(); var $
var $imgWidth1 = $('#carousel1 .car-div').first().outerWidth();
var $imgCount1 = $('#carousel1 .car-div').length;
$('#carousel1').width($imgWidth1*($imgCount1+2));
$('#carousel1').css({'left':-1*$imgWidth1+'px'});//reset the slider so the first image is still visible
$('#next1').click(function(){
$('#carousel1').stop(true,true); //complete any animation still running - in case anyone's a bit click happy...
var $newLeft1 = $('#carousel1').position().left-(1*$imgWidth1);//calculate the new position which is the current position minus the width of one image
$('#carousel1').animate({'left':$newLeft1+'px'},function(){//slide to the new position...
if (Math.abs($newLeft1) == (($imgCount1+1)*$imgWidth1)) //...and if the slider is displaying the last image, which is the clone of the first image...
{
$('#carousel1').css({'left':-1*$imgWidth1+'px'});//...reset the slider back to the first image without animating
}
});
return false;
});
$('#prev1').click(function(){
$('#carousel1').stop(); //complete any animation still running
var $newLeft1 = $('#carousel1').position().left+(1*$imgWidth1);//calculate the new position which is the current position plus the width of one image
$('#carousel1').animate({'left':$newLeft1+'px'},function(){//slide to the new position
if (Math.abs($newLeft1) == (($imgCount1+1)*$imgWidth1)) //if the slider is displaying the first image, which is the clone of the last image
{
//alert('hai');
$('#carousel1').css({'left':-($imgCount1)*$imgWidth1+'px'});//reset the slider back to the last image without animating
}
});
return false;
});
请参阅下面的jsfiddle
请添加演示或html代码,使用JSFIDLE Hi启动此滑块移动有延迟。@schnawel007您能帮我吗。我已经添加了jsfiddle