[
  {
    "path": "README.md",
    "content": "<h1>jquery.event.swipe</h1>\n\n<h2>Dependencies</h2>\n<p>jQuery.event.move: <a href=\"http://stephband.info/jquery.event.move/\">stephband.info/jquery.event.move</a></p>\n\n<p>One of swipeleft, swiperight, swipeup or swipedown is triggered on moveend, when the move has covered at least a threshold proportion of the dimension of the target node.</p>\n\n<p>Swipe events are a thin wrapper around the moveend event, a convenience to reveal when a finger has made a swipe gesture. As such they don't bubble &mdash; they are retriggered on each passing of a moveend event. The underlying move events do bubble and delegate. Use them if you need more flexibility.</p>\n\n\n<h2>CommonJS</h2>\n\n<p>If you're using Browserify, or any other CommonJS-compatible module system, you can require this script by passing it your jQuery reference. For example,<p>\n\n<pre><code class=\"js\">\nrequire('./path/to/jquery.event.move.js')(jQuery);\n</code></pre>\n\n<h2>Demo and docs</h2>\n<a href=\"http://stephband.info/jquery.event.swipe\">stephband.info/jquery.event.swipe</a>\n"
  },
  {
    "path": "bower.json",
    "content": "{\n    \"name\": \"jquery.event.swipe\",\n    \"version\": \"0.5.3\",\n    \"author\": {\n        \"name\": \"Stephen Band\",\n        \"url\": \"http://stephband.info\",\n        \"twitter\": \"stephband\"\n    },\n    \"dependencies\": {\n        \"jquery\": \">=1.7.0\",\n        \"jquery.event.move\": \"1.x\"\n    },\n    \"licenses\": [{\"url\":\"http://www.wtfpl.net/txt/copying/\"}],\n    \"main\": \"js/jquery.event.swipe.js\",\n    \"description\": \"jQuery special events for the gestures swipeleft, swiperight, swipeup and swipedown.\",\n    \"keywords\": [\"touch\",\"special\",\"event\",\"swipe\"],\n    \"homepage\": \"http://github.com/stephband/jquery.event.swipe\",\n    \"docs\": \"http://stephband.info/jquery.event.swipe\"\n}\n"
  },
  {
    "path": "event.swipe.jquery.json",
    "content": "{\n    \"name\": \"event.swipe\",\n    \"title\": \"jquery.event.swipe\",\n    \"version\": \"0.5.3\",\n    \"author\": {\n        \"name\": \"Stephen Band\",\n        \"url\": \"http://stephband.info\"\n    },\n    \"dependencies\": {\n        \"jquery\": \">=1.7.0\",\n        \"jquery.event.move\": \"1.3.x\"\n    },\n    \"licenses\": [{\"url\":\"http://www.wtfpl.net/txt/copying/\"}],\n    \"files\": [\"js/jquery.event.swipe.js\"],\n    \"description\": \"jQuery special events for the gestures swipeleft, swiperight, swipeup and swipedown.\",\n    \"keywords\": [\"touch\",\"special\",\"event\",\"swipe\"],\n    \"homepage\": \"http://github.com/stephband/jquery.event.swipe\",\n    \"docs\": \"http://stephband.info/jquery.event.swipe\"\n}\n"
  },
  {
    "path": "index.html",
    "content": "---\ntitle: jQuery.event.swipe\n---\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n\t<meta charset=\"utf-8\" />\n\t<meta name=\"author\" content=\"\">\n\t<meta name=\"description\" content=\"\">\n\t\n\t<title>jQuery.event.swipe</title>\n\t\n\t<script>document.documentElement.className = 'js';</script>\n\t\n\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.5\">\n\t<!-- Force latest IE rendering engine & Chrome Frame -->\n\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">\n\t<!-- Make IE recognise HTML5 elements for styling -->\n\t<!--[if lte IE 8]><script src=\"http://html5shiv.googlecode.com/svn/trunk/html5.js\"></script><![endif]-->\n\t\n\t<link rel=\"icon\" type=\"image/png\" href=\"images/favicon.png\" />\n\t<link rel=\"apple-touch-icon\" href=\"/apple-touch-icon.png\">\n\t\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"http://stephband.info/css/template.min.css\" />\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"http://stephband.info/css/template.theme.min.css\" />\n\t\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"http://stephband.github.com/css/site.layout.css\" />\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"http://stephband.github.com/css/docs.classes.css\" />\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"http://stephband.github.com/css/site.highlight.light.css\" />\n\t\n\t<!--[if lte IE 8]><link rel=\"stylesheet\" type=\"text/css\" href=\"http://stephband.github.com/template/css/template.ie.css\" /><![endif]-->\n\t<!--[if IE 8]><link rel=\"stylesheet\" type=\"text/css\" href=\"http://stephband.github.com/template/css/template.ie8.css\" /><![endif]-->\n\t<!--[if IE 7]><link rel=\"stylesheet\" type=\"text/css\" href=\"http://stephband.github.com/template/css/template.ie7.css\" /><![endif]-->\n\t\n\t<style>\n\t\t.site_wrap > .slides_wrap {\n\t\t\tmargin-bottom: 1em;\n\t\t\tmargin-left: -8px;\n\t\t\tmargin-right: -8px;\n\t\t}\n\n\t\t.img_slides_wrap {\n\t\t\twidth: 784px;\n\t\t\tborder: 8px solid #333333;\n\t\t\tbackground-color: #444444;\n\t\t\toverflow: hidden;\n\t\t}\n\n\t\t.img_slide {\n\t\t\tpadding: 0;\n\t\t}\n\n\t\t.js .img_slide {\n\t\t\t/* Overide template's height transitions. */\n\t\t\twidth: 100%;\n\t\t\theight: auto;\n\t\t}\n\n\t\t.slide_buttons_index {\n\t\t\ttext-align: center;\n\t\t}\n\n\t\t.notransition,\n\t\t.notransition .slide {\n\t\t\t-webkit-transition-duration: 0 !important;\n\t\t\t   -moz-transition-duration: 0 !important;\n\t\t\t    -ms-transition-duration: 0 !important;\n\t\t\t        transition-duration: 0 !important;\n\t\t\n\t\t\t-webkit-transition-delay: 0 !important;\n\t\t\t   -moz-transition-delay: 0 !important;\n\t\t\t    -ms-transition-delay: 0 !important;\n\t\t\t        transition-delay: 0 !important;\n\t\t}\n\n\t\t@media screen and (max-width: 640px) {\n\t\t\t.img_slides_wrap {\n\t\t\t\twidth: 100%;\n\n\t\t\t\t-webkit-box-sizing: content-box;\n\t\t\t\t   -moz-box-sizing: content-box;\n\t\t\t\t    -ms-box-sizing: content-box;\n\t\t\t\t        box-sizing: content-box;\n\t\t\t}\n\t\t}\n\t</style>\n</head>\n\n<body>\n\t<header class=\"site_header\" id=\"page_header\">\n\t\t<div class=\"site_wrap wrap\">\n\t\t\t<a class=\"logo_thumb thumb\" href=\"http://stephband.info\" title=\"stephband\" rel=\"index\">\n\t\t\t\t<h1>stephband.info</h1>\n\t\t\t</a>\n\t\t</div>\n\t</header>\n\n\t<div class=\"site_wrap wrap\">\n\t\t<h1>jQuery.event.swipe</h1>\n\t\n\t\t<div class=\"img_slides_wrap slides_wrap wrap\">\n\t\t\t<img class=\"img_slide slide active\" id=\"slide1\" src=\"https://lh5.googleusercontent.com/-MShhyv4lWuM/T4Si18g0XsI/AAAAAAAAANU/Nnnxh68myRA/s768/Norway_201241.png\"\n\t\t\t/><img class=\"img_slide slide\" id=\"slide2\" src=\"https://lh6.googleusercontent.com/-BED5h574s1Q/T4Sji7_hmOI/AAAAAAAAAO8/JMChDngsCDk/s768/Norway_201284.png\"\n\t\t\t/><img class=\"img_slide slide\" id=\"slide3\" src=\"https://lh6.googleusercontent.com/-n31QkVB4M9c/T4SjckZM1TI/AAAAAAAAAOs/H26JyEo9970/s768/Norway_201276.png\"\n\t\t\t/><img class=\"img_slide slide\" id=\"slide4\" src=\"https://lh6.googleusercontent.com/-jti_dD8mDiQ/T4ShY14T5HI/AAAAAAAAAKE/-jF6OT_zmb4/s768/Norway_2012102.png\" />\n\t\t</div>\n\n\t\t<ul class=\"horizontal slide_buttons_index buttons_index index\">\n\t\t\t<li><a class=\"slide_button button\" href=\"#slide1\">1</a></li>\n\t\t\t<li><a class=\"slide_button button\" href=\"#slide2\">2</a></li>\n\t\t\t<li><a class=\"slide_button button\" href=\"#slide3\">3</a></li>\n\t\t\t<li><a class=\"slide_button button\" href=\"#slide4\">4</a></li>\n\t\t</ul>\n\n\t\t<h2>Project</h2>\n\t\t<ul>\n\t\t\t<li>Github: <a href=\"http://github.com/stephband/jquery.event.swipe\">github.com/stephband/jquery.event.swipe</a></li>\n\t\t\t<li>Issues: <a href=\"http://github.com/stephband/jquery.event.swipe/issues\">github.com/stephband/jquery.event.swipe/issues</a></li>\n\t\t\t<li>Dependency: <a href=\"http://github.com/stephband/jquery.event.move\">github.com/stephband/jquery.event.move</a></li>\n\t\t</ul>\n\t\t\n\t\t<h2 id=\"what\">Swipe events</h2>\n\t\t<dl>\n\t\t\t<dt>swipeleft, swiperight, swipeup, swipedown</dt>\n\t\t\t<dd>Fired when the finger is released from the touch surface (or mouse button) if the finger has a) just moved at least a threshold distance or b) moved quickly over a shorter distance.\n\t\t\t\t\tAlso responds to mouse events.</dd>\n\t\t</dl>\n\t\t<p>Swipe event objects are augmented with the properties:</p>\n\t\t<dl>\n\t\t\t<dt>e.pageX, e.pageY</dt>\n\t\t\t<dd>Current page coordinates of pointer.</dd>\n\t\t\t\n\t\t\t<dt>e.startX, e.startY</dt>\n\t\t\t<dd>Page coordinates the pointer had at the start of the swipe.</dd>\n\t\t\t\n\t\t\t<dt>e.distX, e.distY</dt>\n\t\t\t<dd>Distance finger moved during the swipe.</dd>\n\t\n\t\t\t<dt>e.velocityX, e.velocityY</dt>\n\t\t\t<dd>Velocity, in pixels/ms, averaged over the last few move events.</dd>\n\t\t</dl>\n\t\n\t\t<h2 id=\"how\">How to use swipe events</h2>\n\t\n{% highlight js %}\nvar slides = jQuery('.slides'),\n    i = 0;\n\nslides\n.on('swipeleft', function(e) {\n  slides.eq(i + 1).addClass('active');\n})\n.on('swiperight', function(e) {\n  slides.eq(i - 1).addClass('active');\n});{% endhighlight %}\n\t\n\t\t<p>\n\t\t\tSwipe events are a thin wrapper around the moveend event; a convenience to reveal when a finger has moved in a swipe gesture.\n\t\t\tThe underlying move events bubble and you can delegate them, but making the swipe events also do this would be unnecessarily expensive.\n\t\t\tUse move events if you need more flexibility.\n\t\t</p>\n\t\n\t\t<h2 id=\"scroll\">Swipe or scroll</h2>\n\t\t<p>\n\t\t   Swipe events are a thin wrapper built on top of move events (<a href=\"http://stephband.info/jquery.event.move/\">stephband.info/jquery.event.move</a>).\n\t\t   Move events, by default, override native scrolling, as they assume that you want to move something rather than scroll the window.\n\t\t   To re-enable scrolling, call <code>e.preventDefault()</code> inside a movestart handler.\n\t\t</p>\n\t\t<p>\n\t\t   In the example above, we want to be able to <code>swipeleft</code> and <code>swiperight</code>, but scroll up and down.\n\t\t   Inside a movestart handler, the direction of the finger is moving is calculated and the event is prevented if it is found to be moving up or down::</p>\n\n{% highlight js %}\njQuery('.mydiv')\n.on('movestart', function(e) {\n  // If the movestart is heading off in an upwards or downwards\n  // direction, prevent it so that the browser scrolls normally.\n  if ((e.distX > e.distY && e.distX < -e.distY) ||\n      (e.distX < e.distY && e.distX > -e.distY)) {\n    e.preventDefault();\n  }\n});{% endhighlight %}\n\n\t\t<p>To see how the example at the top of the page works, view source.</p>\n\n\t\t<h2 id=\"where\">Who made it?</h2>\n\t\t<p>I did. I'm <a href=\"http://twitter.com/stephband\">stephband</a> on twitter, if you're into that sort of thing.</p>\n\t</div>\n\n\t<footer class=\"site_footer\">\n\t\t<div class=\"full_wrap wrap\">\n\t\t\t<div class=\"bio_col col\">\n\t\t\t\t<h3>Who made this?</h3>\n\t\t\t\t<p>I did. I come from Scotland and I live in Lausanne, Switzerland. I make web things at <a href=\"http://cruncher.ch\">Cruncher</a>. I miss Branston Pickle. When I'm not glued to a screen I play music and hike mountains.</p>\n\t\t\t</div\n\t\t\t><div class=\"repo_col col\">\n\t\t\t\t<h3>More code</h3>\n\t\t\t\t<ul class=\"repo_index index\">\n\t\t\t\t\t<li><a href=\"http://stephband.info/bolt\">Bolt</a></li>\n\t\t\t\t\t<li><a href=\"http://stephband.info/jparallax/\">jQuery.parallax</a></li>\n\t\t\t\t\t<li><a href=\"http://stephband.info/jquery.event.tap/\">jQuery.event.tap</a></li>\n\t\t\t\t\t<li><a href=\"http://stephband.info/jquery.event.move/\">jQuery.event.move</a></li>\n\t\t\t\t\t<li><a href=\"http://stephband.info/jquery.event.swipe/\">jQuery.event.swipe</a></li>\n\t\t\t\t</ul>\n\t\t\t</div\n\t\t\t><div class=\"social_col col\">\n\t\t\t\t<h3>Find me on...</h3>\n\t\t\t\t<ul class=\"social_index index\">\n\t\t\t\t\t<li><a href=\"http://twitter.com/stephband\">twitter</a></li>\n\t\t\t\t\t<li><a href=\"http://github.com/stephband\">github</a></li>\n\t\t\t\t\t<li><a href=\"http://plus.google.com/114566808430966059989/photos\">google+</a></li>\n\t\t\t\t\t<li><a href=\"http://www.linkedin.com/profile/view?id=27013870\">linkedin</a></li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</div>\n\t</footer>\n\n\t<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.js\"></script>\n\t<script src=\"http://stephband.info/jquery.event.move/js/jquery.event.move.js\"></script>\n\t<script src=\"js/jquery.event.swipe.js\"></script>\n\t<script>\n\t\t(function(jQuery, undefined) {\n\t\t\tjQuery(document).ready(function() {\n\t\t\t\tvar wrap = jQuery('.slides_wrap'),\n\t\t\t\t    slides = wrap.find('.img_slide'),\n\t\t\t\t    active = slides.filter('.active'),\n\t\t\t\t    buttons = jQuery('.slide_button'),\n\t\t\t\t    i = slides.index(active),\n\t\t\t\t    width = wrap.width();\n\n\t\t\t\t// Listen for swipe events on slides, and use a custom 'activate'\n\t\t\t\t// event to add and remove the class 'active' to the previous\n\t\t\t\t// or next slide, and to keep the index up-to-date. The class\n\t\t\t\t// 'active' uses CSS transitions to make the slide move.\n\n\t\t\t\tslides\n\n\t\t\t\t.on('swipeleft', function(e) {\n\t\t\t\t\tif (i === slides.length - 1) { return; }\n\t\t\t\t\tslides.eq(i + 1).trigger('activate');\n\t\t\t\t})\n\n\t\t\t\t.on('swiperight', function(e) {\n\t\t\t\t\tif (i === 0) { return; }\n\t\t\t\t\tslides.eq(i - 1).trigger('activate');\n\t\t\t\t})\n\n\t\t\t\t.on('activate', function(e) {\n\t\t\t\t\tslides.eq(i).removeClass('active');\n\t\t\t\t\tbuttons.eq(i).removeClass('on');\n\n\t\t\t\t\tjQuery(e.target).addClass('active');\n\n\t\t\t\t\t// Update the active slide index\n\t\t\t\t\ti = slides.index(e.target);\n\n\t\t\t\t\t// select active class for slide button\n\t\t\t\t\tbuttons.eq(i).addClass('on');\n\t\t\t\t})\n\n\t\t\t\t// The code below handles what happens before any swipe event is triggered.\n\t\t\t\t// It makes the slides demo on this page work nicely, but really doesn't\n\t\t\t\t// have much to do with demonstrating the swipe events themselves. For more\n\t\t\t\t// on move events see:\n\t\t\t\t//\n\t\t\t\t// http://stephband.info/jquery.event.move\n\n\t\t\t\t.on('movestart', function(e) {\n\t\t\t\t\t// If the movestart heads off in a upwards or downwards\n\t\t\t\t\t// direction, prevent it so that the browser scrolls normally.\n\t\t\t\t\tif ((e.distX > e.distY && e.distX < -e.distY) ||\n\t\t\t\t\t    (e.distX < e.distY && e.distX > -e.distY)) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// To allow the slide to keep step with the finger,\n\t\t\t\t\t// temporarily disable transitions.\n\t\t\t\t\twrap.addClass('notransition');\n\t\t\t\t})\n\n\t\t\t\t.on('move', function(e) {\n\t\t\t\t\tvar left = 100 * e.distX / width;\n\n\t\t\t\t\t// Move slides with the finger\n\t\t\t\t\tif (e.distX < 0) {\n\t\t\t\t\t\tif (slides[i+1]) {\n\t\t\t\t\t\t\tslides[i].style.left = left + '%';\n\t\t\t\t\t\t\tslides[i+1].style.left = (left+100)+'%';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tslides[i].style.left = left/4 + '%';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (e.distX > 0) {\n\t\t\t\t\t\tif (slides[i-1]) {\n\t\t\t\t\t\t\tslides[i].style.left = left + '%';\n\t\t\t\t\t\t\tslides[i-1].style.left = (left-100)+'%';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tslides[i].style.left = left/5 + '%';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\t.on('moveend', function(e) {\n\t\t\t\t\twrap.removeClass('notransition');\n\t\t\t\t\t\n\t\t\t\t\tslides[i].style.left = '';\n\t\t\n\t\t\t\t\tif (slides[i+1]) {\n\t\t\t\t\t\tslides[i+1].style.left = '';\n\t\t\t\t\t}\n\t\t\t\t\tif (slides[i-1]) {\n\t\t\t\t\t\tslides[i-1].style.left = '';\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Make the buttons work, too. Hijack the id stored in the href and use\n\t\t\t\t// it to activate the slide.\n\n\t\t\t\tjQuery(document)\n\t\t\t\t.on('click', '.slide_button', function(e) {\n\t\t\t\t\tvar href = e.currentTarget.hash;\n\n\t\t\t\t\tjQuery(href).trigger('activate');\n\n\t\t\t\t\te.preventDefault();\n\t\t\t\t});\n\t\t\t});\n\t\t})(jQuery);\t\n\t</script>\n</body>\n</html>\n"
  },
  {
    "path": "js/jquery.event.swipe.js",
    "content": "// jQuery.event.swipe\n// 0.5\n// Stephen Band\n\n// Dependencies\n// jQuery.event.move 1.2\n\n// One of swipeleft, swiperight, swipeup or swipedown is triggered on\n// moveend, when the move has covered a threshold ratio of the dimension\n// of the target node, or has gone really fast. Threshold and velocity\n// sensitivity changed with:\n//\n// jQuery.event.special.swipe.settings.threshold\n// jQuery.event.special.swipe.settings.sensitivity\n\n(function (thisModule) {\n\tif (typeof define === 'function' && define.amd) {\n        // AMD. Register as an anonymous module.\n        define(['jquery', undefined, 'jquery.event.move'], thisModule);\n    } else if ((typeof module !== \"undefined\" && module !== null) && module.exports) {\n        module.exports = thisModule;\n\t} else {\n\t\t// Browser globals\n        thisModule(jQuery);\n\t}\n})(function(jQuery, undefined){\n\tvar add = jQuery.event.add,\n\t   \n\t    remove = jQuery.event.remove,\n\n\t    // Just sugar, so we can have arguments in the same order as\n\t    // add and remove.\n\t    trigger = function(node, type, data) {\n\t    \tjQuery.event.trigger(type, data, node);\n\t    },\n\n\t    settings = {\n\t    \t// Ratio of distance over target finger must travel to be\n\t    \t// considered a swipe.\n\t    \tthreshold: 0.4,\n\t    \t// Faster fingers can travel shorter distances to be considered\n\t    \t// swipes. 'sensitivity' controls how much. Bigger is shorter.\n\t    \tsensitivity: 6\n\t    };\n\n\tfunction moveend(e) {\n\t\tvar w, h, event;\n\n\t\tw = e.currentTarget.offsetWidth;\n\t\th = e.currentTarget.offsetHeight;\n\n\t\t// Copy over some useful properties from the move event\n\t\tevent = {\n\t\t\tdistX: e.distX,\n\t\t\tdistY: e.distY,\n\t\t\tvelocityX: e.velocityX,\n\t\t\tvelocityY: e.velocityY,\n\t\t\tfinger: e.finger\n\t\t};\n\n\t\t// Find out which of the four directions was swiped\n\t\tif (e.distX > e.distY) {\n\t\t\tif (e.distX > -e.distY) {\n\t\t\t\tif (e.distX/w > settings.threshold || e.velocityX * e.distX/w * settings.sensitivity > 1) {\n\t\t\t\t\tevent.type = 'swiperight';\n\t\t\t\t\ttrigger(e.currentTarget, event);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (-e.distY/h > settings.threshold || e.velocityY * e.distY/w * settings.sensitivity > 1) {\n\t\t\t\t\tevent.type = 'swipeup';\n\t\t\t\t\ttrigger(e.currentTarget, event);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (e.distX > -e.distY) {\n\t\t\t\tif (e.distY/h > settings.threshold || e.velocityY * e.distY/w * settings.sensitivity > 1) {\n\t\t\t\t\tevent.type = 'swipedown';\n\t\t\t\t\ttrigger(e.currentTarget, event);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (-e.distX/w > settings.threshold || e.velocityX * e.distX/w * settings.sensitivity > 1) {\n\t\t\t\t\tevent.type = 'swipeleft';\n\t\t\t\t\ttrigger(e.currentTarget, event);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getData(node) {\n\t\tvar data = jQuery.data(node, 'event_swipe');\n\t\t\n\t\tif (!data) {\n\t\t\tdata = { count: 0 };\n\t\t\tjQuery.data(node, 'event_swipe', data);\n\t\t}\n\t\t\n\t\treturn data;\n\t}\n\n\tjQuery.event.special.swipe =\n\tjQuery.event.special.swipeleft =\n\tjQuery.event.special.swiperight =\n\tjQuery.event.special.swipeup =\n\tjQuery.event.special.swipedown = {\n\t\tsetup: function( data, namespaces, eventHandle ) {\n\t\t\tvar data = getData(this);\n\n\t\t\t// If another swipe event is already setup, don't setup again.\n\t\t\tif (data.count++ > 0) { return; }\n\n\t\t\tadd(this, 'moveend', moveend);\n\n\t\t\treturn true;\n\t\t},\n\n\t\tteardown: function() {\n\t\t\tvar data = getData(this);\n\n\t\t\t// If another swipe event is still setup, don't teardown.\n\t\t\tif (--data.count > 0) { return; }\n\n\t\t\tremove(this, 'moveend', moveend);\n\n\t\t\treturn true;\n\t\t},\n\n\t\tsettings: settings\n\t};\n});\n"
  },
  {
    "path": "package.json",
    "content": "{\n    \"name\": \"jquery.event.swipe\",\n    \"title\": \"jquery.event.swipe\",\n    \"version\": \"0.5.4\",\n    \"author\": {\n        \"name\": \"Stephen Band\",\n        \"url\": \"http://stephband.info\",\n        \"twitter\": \"stephband\"\n    },\n    \"dependencies\": {\n        \"jquery\": \">=1.7.0\",\n        \"jquery.event.move\": \"1.x\"\n    },\n    \"licenses\": [{\"url\": \"http://www.wtfpl.net/txt/copying/\"}],\n    \"files\": [\"js/jquery.event.swipe.js\"],\n    \"main\": \"js/jquery.event.swipe.js\",\n    \"description\": \"jQuery special events for the gestures swipeleft, swiperight, swipeup and swipedown.\",\n    \"keywords\": [\"touch\",\"special\",\"event\",\"swipe\",\"dom\",\"jquery\"],\n    \"homepage\": \"http://github.com/stephband/jquery.event.swipe\",\n    \"docs\": \"http://stephband.info/jquery.event.swipe\"\n}\n"
  }
]