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

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -