Enables Backbone views with fast tap and swipe events on touch devices.
The plugin is made to work with your existing views. It replaces the delegateEvents
method and replaces any click event with the three events touchstart, touchmove and touchend when a touch device is used. Once the touchend fires your callback is executed without the 300ms delay that the click event has.
- Addresses the 300ms delay
- Uses FastClick if available
- Multi-touch monitoring
- One finger swipes
- AMD/CommonJS module
Using Bower
bower install backbone.input.touch`
Manual download
Note that this extension currently overwrites Backbone.View
but its features are behing an option flag, to limit its usage only when needed.
After all dependencies (an plugin) are loaded, simply include touch in your monitor
array:
var view = new Backbone.View({
options: {
monitor: ["touch"]
}
});
Initiated by Makis Tracend ( @tracend )
Distributed through Makesites.org
Originally based on Backbone.Touch
Released under the MIT License