Giter Site home page Giter Site logo

backbone.touch's Introduction

Backbone.touch

Monkey patch Backbone.View to enable fast tap events on touch devices.

Usage

Backbone.touch 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.

Download & Include

Bower install

bower install backbone.touch

Manual download

Depends on Underscore, Backbone and jQuery. You can swap out the jQuery dependency completely with a custom configuration.

Include in your application after jQuery, Underscore, and Backbone have been included.

<script src="/js/jquery.js"></script>
<script src="/js/underscore.js"></script>
<script src="/js/backbone.js"></script>

<script src="/js/backbone.touch.js"></script>

Note that backbone.touch currently overwrites Backbone.View to make its usage a no-op part from including it.

Release notes

0.4

  • NodeJS + Browserify environment support

0.3

  • Possibility to override the threshold
  • Grunt v4.0

0.2

  • Register as an anonymous AMD module

0.1

  • Initial release. Only tested on iPad

License

MIT License (c) Raymond Julin

backbone.touch's People

Contributors

jamuhl avatar kevinsperrine avatar krawaller avatar loicmahieu avatar neilkumar avatar nervetattoo avatar streunerlein avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.