be-fe / iSlider

Smooth mobile touch slider for Mobile WebApp, HTML5 App, Hybrid App
http://be-fe.github.io/iSlider/
MIT License
1.66k stars 448 forks source link

找了很久,没找到获取当前activePage对应的index值 #262

Closed DevilZh closed 8 years ago

DevilZh commented 8 years ago

我想要实现一些css3动画,我习惯使用添加active的class,然后触发对应页面的动画效果,但是没找获取当前index值的接口啊。求告知…

xieyu33333 commented 8 years ago

islider.slideIndex

shinate commented 8 years ago

可以添加事件,islider.on('slideChanged', 回调),回调方法传递的参数: function(事件名,index,当前容器节点(li), 当前iSlider实例自身)

DevilZh commented 8 years ago

@shinate @xieyu33333 多谢,我昨天通过淘宝npm镜像下载的,发现版本是1.1.1 现在完美解决XD

lococo--0 commented 8 years ago

@shinate 2.x是还没有release么,用bower装不到2.X

shinate commented 8 years ago

昨天release的,估计是同步需要时间