我正在玩bxslider,有时它可以正常工作,其他情况则不然。我认为它与javascript错误有关,它说:TypeError: Has no method goToNextSlider();
我不是jQuery的专家......
var slider = $('.bxslider').bxSlider({
controls: false,
pager: false
});
$('#pronext').click(function(){
slider.goToNextSlide();
return false;
});
$('#proprev').click(function(){
slider.goToPrevSlide();
return false;
});
HTML
<div class='row'>
<div class='large-1 columns'>
<a href='' id='proprev'><img alt="Prev" class="testimonials__navigation__arrow" src="/assets/prev.png" /></a>
</div>
<div class='large-10 columns'>
<ul class='bxslider'>
<li>1</li>
<li>2</li>
</ul>
</div>
<div class='large-1 columns'>
<a href='' id='pronext'><img alt="Next" class="testimonials__navigation__arrow" src="/assets/next.png" /></a>
</div>
</div>
提前致谢.. 启