carousel - Handle swipe events in Sencha Touch 2 -
i use carousel in sencha touch 2. how can handle swipe-left , swipe-right events ?
one way listen swipe event on carousel items along using ext.event.event.direction handle direction of swipe:
listeners: { initialize: function(c) { this.element.on({ swipe: function(e, node, options) { if(e.direction == "left") { alert("hey! swipe left"); } else { alert("hey! swipe right"); } } }); } }
working demo: http://www.senchafiddle.com/#tlbzb
Comments
Post a Comment