{"maintainers":[{"name":"dmitri","email":"dmitri.voronianski@gmail.com"}],"dist-tags":{"latest":"2.0.3"},"description":"[![npm version](http://badge.fury.io/js/swipe-js-iso.svg)](http://badge.fury.io/js/swipe-js-iso) [![Download Count](http://img.shields.io/npm/dm/swipe-js-iso.svg?style=flat)](http://www.npmjs.com/package/swipe-js-iso)","readme":"# Universal (a.k.a isomorphic) Swipe.js\n\n[![npm version](http://badge.fury.io/js/swipe-js-iso.svg)](http://badge.fury.io/js/swipe-js-iso)\n[![Download Count](http://img.shields.io/npm/dm/swipe-js-iso.svg?style=flat)](http://www.npmjs.com/package/swipe-js-iso)\n\n> Fork of original [Swipe](https://github.com/thebird/Swipe) in order to be published to NPM (has no deps) and being compatible with isomorphic apps. Install it like:\n\n```bash\nnpm install swipe-js-iso\n```\n\n_PRO HINT:_ Use [ReactSwipe](https://github.com/jed/react-swipe) component with [React](https://facebook.github.io/react).\n\n## Usage\n\nSwipe only needs to follow a simple pattern. Here is an example:\n\n``` html\n<div id='slider' class='swipe'>\n  <div class='swipe-wrap'>\n    <div></div>\n    <div></div>\n    <div></div>\n  </div>\n</div>\n```\n\nAbove is the initial required structure– a series of elements wrapped in two containers. Place any content you want within the items. The containing div will need to be passed to the Swipe function like so:\n\n``` js\nwindow.mySwipe = Swipe(document.getElementById('slider'));\n```\n\nI always place this at the bottom of the page, externally, to verify the page is ready.\n\nAlso Swipe needs just a few styles added to your stylesheet:\n\n``` css\n.swipe {\n  overflow: hidden;\n  visibility: hidden;\n  position: relative;\n}\n.swipe-wrap {\n  overflow: hidden;\n  position: relative;\n}\n.swipe-wrap > div {\n  float:left;\n  width:100%;\n  position: relative;\n}\n```\n\n## Config Options\n\nSwipe can take an optional second parameter– an object of key/value settings:\n\n- **startSlide** Integer *(default:0)* - index position Swipe should start at\n\n-\t**speed** Integer *(default:300)* - speed of prev and next transitions in milliseconds.\n\n- **auto** Integer - begin with auto slideshow (time in milliseconds between slides)\n\n- **continuous** Boolean *(default:true)* - create an infinite feel with no endpoints\n\n- **disableScroll** Boolean *(default:false)* - stop any touches on this container from scrolling the page\n\n- **stopPropagation** Boolean *(default:false)* - stop event propagation\n \n- **swiping** Function - invoked while swiping with the percentage (0-1) of the full width that has been swiped.\n\n-\t**callback** Function - runs at slide change.\n\n- **transitionEnd** Function - runs at the end slide transition.\n\n### Example\n\n``` js\n\nwindow.mySwipe = new Swipe(document.getElementById('slider'), {\n  startSlide: 2,\n  speed: 400,\n  auto: 3000,\n  continuous: true,\n  disableScroll: false,\n  stopPropagation: false,\n  callback: function(index, elem) {},\n  transitionEnd: function(index, elem) {}\n});\n\n```\n\n## Swipe API\n\nSwipe exposes a few functions that can be useful for script control of your slider.\n\n`prev()` slide to prev\n\n`next()` slide to next\n\n`getPos()` returns current slide index position\n\n`getNumSlides()` returns the total amount of slides\n\n`slide(index, duration)` slide to set index position (duration: speed of transition in milliseconds)\n\n## Browser Support\n\nSwipe is now compatible with all browsers, including IE7+. Swipe works best on devices that support CSS transforms and touch, but can be used without these as well. A few helper methods determine touch and CSS transition support and choose the proper animation methods accordingly.\n\n## Who's using Swipe\n\n<img src='https://raw.githubusercontent.com/voronianski/swipe-js-iso/master/assets/cnn.png' width='80'>\n<img src='https://raw.githubusercontent.com/voronianski/swipe-js-iso/master/assets/airbnb.png' width='170'>\n<img src='https://raw.githubusercontent.com/voronianski/swipe-js-iso/master/assets/nhl.png' height='80'>\n<img src='https://raw.githubusercontent.com/voronianski/swipe-js-iso/master/assets/htc.png' height='80'>\n<img src='https://raw.githubusercontent.com/voronianski/swipe-js-iso/master/assets/thinkgeek.png' height='80'>\n<img src='https://raw.githubusercontent.com/voronianski/swipe-js-iso/master/assets/snapguide.png' height='80'>\n\n## License\n\nCopyright (c) 2013-2015 Brad Birdsall Licensed under the [The MIT License (MIT)](http://opensource.org/licenses/MIT).\n","repository":{"type":"git","url":"git+https://github.com/voronianski/swipe-js-iso.git"},"users":{"tedyhy":true},"bugs":{"url":"https://github.com/voronianski/swipe-js-iso/issues"},"license":"MIT","versions":{"2.0.0":{"name":"swipe-js-iso","version":"2.0.0","main":"swipe.js","scripts":{"build":"grunt"},"dependencies":{},"devDependencies":{"grunt":"~0.4.1","grunt-contrib-uglify":"~0.2.4"},"engines":{"node":">=0.8.0"},"gitHead":"5c7fa6a6649f05717c31b4dba37998ca18755338","description":"> Fork of original [Swipe](https://github.com/thebird/Swipe) in order to be published to NPM (has no deps) and being compatible with isomorphic apps. Install it like:","_id":"swipe-js-iso@2.0.0","_shasum":"8e629d1f851b23234033676cd498889ddbc5146e","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"dmitri","email":"dmitri.voronianski@gmail.com"},"maintainers":[{"name":"dmitri","email":"dmitri.voronianski@gmail.com"}],"dist":{"shasum":"8e629d1f851b23234033676cd498889ddbc5146e","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/swipe-js-iso/-/swipe-js-iso-2.0.0.tgz"},"directories":{}},"2.0.1":{"name":"swipe-js-iso","version":"2.0.1","main":"swipe.js","scripts":{"build":"grunt"},"dependencies":{},"devDependencies":{"grunt":"~0.4.1","grunt-contrib-uglify":"~0.2.4"},"engines":{"node":">=0.8.0"},"gitHead":"8f74f21a2801b7edc290d53d8cbf3c157081699d","description":"> Fork of original [Swipe](https://github.com/thebird/Swipe) in order to be published to NPM (has no deps) and being compatible with isomorphic apps. Install it like:","_id":"swipe-js-iso@2.0.1","_shasum":"f670c72bb98116485c194e69454cdb6897770a18","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"dmitri","email":"dmitri.voronianski@gmail.com"},"maintainers":[{"name":"dmitri","email":"dmitri.voronianski@gmail.com"}],"dist":{"shasum":"f670c72bb98116485c194e69454cdb6897770a18","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/swipe-js-iso/-/swipe-js-iso-2.0.1.tgz"},"directories":{}},"2.0.2":{"name":"swipe-js-iso","version":"2.0.2","main":"swipe.js","scripts":{"build":"grunt"},"repository":{"type":"git","url":"git+https://github.com/voronianski/swipe-js-iso.git"},"license":"MIT","homepage":"https://github.com/voronianski/swipe-js-iso#readme","dependencies":{},"devDependencies":{"grunt":"~0.4.1","grunt-contrib-uglify":"~0.2.4"},"engines":{"node":">=0.8.0"},"gitHead":"64abc388402b6a62ec3f82493e44e7104279e381","description":"> Fork of original [Swipe](https://github.com/thebird/Swipe) in order to be published to NPM (has no deps) and being compatible with isomorphic apps. Install it like:","bugs":{"url":"https://github.com/voronianski/swipe-js-iso/issues"},"_id":"swipe-js-iso@2.0.2","_shasum":"f64d2a51cf3fa192799496d2e07ffce88a16851d","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"dmitri","email":"dmitri.voronianski@gmail.com"},"maintainers":[{"name":"dmitri","email":"dmitri.voronianski@gmail.com"}],"dist":{"shasum":"f64d2a51cf3fa192799496d2e07ffce88a16851d","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/swipe-js-iso/-/swipe-js-iso-2.0.2.tgz"},"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/swipe-js-iso-2.0.2.tgz_1454605790268_0.8914612336084247"},"directories":{}},"2.0.3":{"name":"swipe-js-iso","version":"2.0.3","main":"swipe.js","scripts":{"build":"grunt"},"repository":{"type":"git","url":"git+https://github.com/voronianski/swipe-js-iso.git"},"license":"MIT","homepage":"https://github.com/voronianski/swipe-js-iso#readme","dependencies":{},"devDependencies":{"grunt":"~0.4.1","grunt-contrib-uglify":"~0.2.4"},"engines":{"node":">=0.8.0"},"gitHead":"24c2f3754fea1d1190ffa2b83ef90bac1de96325","description":"[![npm version](http://badge.fury.io/js/swipe-js-iso.svg)](http://badge.fury.io/js/swipe-js-iso) [![Download Count](http://img.shields.io/npm/dm/swipe-js-iso.svg?style=flat)](http://www.npmjs.com/package/swipe-js-iso)","bugs":{"url":"https://github.com/voronianski/swipe-js-iso/issues"},"_id":"swipe-js-iso@2.0.3","_shasum":"76892ca4fc2928f384ac042739a25f7afe6fcf74","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.3.2","_npmUser":{"name":"dmitri","email":"dmitri.voronianski@gmail.com"},"maintainers":[{"name":"dmitri","email":"dmitri.voronianski@gmail.com"}],"dist":{"shasum":"76892ca4fc2928f384ac042739a25f7afe6fcf74","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/swipe-js-iso/-/swipe-js-iso-2.0.3.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/swipe-js-iso-2.0.3.tgz_1459267197220_0.11122736195102334"},"directories":{}}},"name":"swipe-js-iso","time":{"modified":"2017-04-12T08:31:58.893Z","created":"2015-03-30T21:19:29.021Z","2.0.0":"2015-03-30T21:19:29.021Z","2.0.1":"2015-03-31T09:20:35.873Z","2.0.2":"2016-02-04T17:09:54.317Z","2.0.3":"2016-03-29T15:59:58.240Z"},"readmeFilename":"README.md","homepage":"https://github.com/voronianski/swipe-js-iso#readme"}