我正在使用光滑的旋转木马类作为滑块.
HTML:
HTML:
<div class="map"> <div> <div class="step"> <div class="m_left"><a href="#" class="next-slide"> nextPage</a></p> </div> <div class="m_right"><img src="/bindella/images/map_tsc.jpg"></div> </div> </div> <div>your content</div> <div>your content</div> <div>your content</div> </div> </div>
JS:
$(document).ready(function() { $('.map').slick({ centerMode: true,adaptiveHeight: true }); $('.next-slide').click(function() { $('.map').slickGoTo(1); }); });
功能slickGoTo不起作用.怎么了?
解决方法
请试试:
$('.slider').slick('slickGoTo',number);