Flick
Jump to navigation
Jump to search
Mojo.Event.flick
Here is how I created a swipe right for next and left for previous.
// Swipe left (next), right (prev) Mojo.Event.listen($('read_scroller'), Mojo.Event.flick, function(event) { // Swipe next if (event.velocity.x < 0 && event.velocity.y.abs() < 200) { ReadAssistant.prototype.get_chapter('next'); $('read_spinner').mojo.start(); } // Swipe prev if (event.velocity.x > 0 && event.velocity.y.abs() < 200) { ReadAssistant.prototype.get_chapter('prev'); $('read_spinner').mojo.start(); } });
Hope this is helpful.