在 boxslider 中,自动滑动第一次工作正常。但是当我们点击控件(左右箭头)时,自动滑动不起作用。这是我的代码:
<ul id="slider-assocoates">
<li><a href="#" target="_blank"><img src="images/abcdef.png" /></a>
</li>
<li><a href="#" target="_blank"><img src="images/abc.png" /></a>
</li>
</ul>
<nav>
<a href="#" id="go-prev-assocoates" class="left-arrow">Prev</a>
<a href="#" id='go-next-assocoates' class="right-arrow">Next</a>
</nav>
$(function(){
var slider = $('#slider-assocoates').bxSlider({
controls: false,
auto: true,
pause: 6000
});
$('#go-prev-assocoates').click(function(){
slider.goToPreviousSlide();
return false;
});
$('#go-next-assocoates').click(function(){
slider.goToNextSlide();
return false;
});