background preloader

Interact.js - JavaScript drag and drop, resizing and gestures with inertia and snapping

Interact.js - JavaScript drag and drop, resizing and gestures with inertia and snapping

interact.js API Documentation interact.js is a JavaScript module for drag and drop, resizing and multi-touch gestures with inertia and snapping for modern browsers (and also IE8+). To get a quick overview of how interact.js is intended to be used, read this post on Mozilla Hacks. For a reference of all methods, go to Download $ bower install interact $ npm install interact.js Either: with Bowerwith npmmanually from After downloading the file, add to your page’s HTML a <script> tag who’s src attribute points to the file. jsDelivr CDN If you’d prefer to use the jsDelivr CDN instead, simply add a script tag pointing to //cdn.jsdelivr.net/interact.js/VERSION/interact.min.js. Module interact is exposed as a CommonJS module, an AMD module, or a global object depending on what the environment supports. The interact function takes an Element or CSS selector and an optional options object. Selector Contexts <ul id="my-list"><li> item 1 </li><li> item 2 </li><li> item 3 </li></ul>

Related: