sencha touch 监控 Carousel 旋转事件

 1             //监控幻灯片页面
 2             huandeng: {
 3                 //幻灯片旋转事件
 4                 painted: function (sender, opts) {
 5                     sender.element.on('dragend',
 6                     function (e) {
 7                         if (sender.offset == 0) {
 8                             if (sender.getActiveIndex() == sender.getMaxItemIndex()) { //当幻灯片转到最后一页时加载主页
 9                              //你想要执行的js
10                             }
11                         }
12                     });
13                 }
14             }

主要用于将Carousel作为引导页,滑到最后一页时转向主页

使用示例:

http://www.cnblogs.com/mlzs/p/3382229.html

原文地址:https://www.cnblogs.com/mlzs/p/3109868.html