Trigger ResponsiveSlides.js programmatically

偶尔善良 提交于 2019-12-06 13:05:31

You can't call the slideTo() function because it is assigned only to a local variable in the plugin method.

Your second attempt was close, but it looks like the click handler is bound to an <a> element.

Try:

$('.rslides_tabs').find('a').eq(index).trigger('click');

Where index is the zero-based index of the slide you want to show.

Note: If you passed a value in for the "namespace" option, then you would have to change the class name from "rslides_tabs" to whatever value you passed + "_tabs". So if you passed ( namespace: 'mynamespace' } for the options, the class would be "mynamespace_tabs".

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