AnythingSlider: how to restart slideshow

馋奶兔 提交于 2019-12-11 03:37:28

问题


I'm starting the slideshow in a pop up div by clicking a button using $('#slider2').data('AnythingSlider').startStop(true);

Stopping the slideshow by $('#slider2').data('AnythingSlider').startStop(false);

When I click the same button to show again it simply continues from the slideshow that was stopped before. I want the whole slideshow to restart again. How can I do that ?


回答1:


when restarting, do this:

$('#slider2').anythingSlider(1); // Reset to first slide
$('#slider2').data('AnythingSlider').startStop(true);


来源:https://stackoverflow.com/questions/5879060/anythingslider-how-to-restart-slideshow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!