Sha256: ec30790eeb496eee2d5f2dbdff0a8911058a3b83f7b125d704cb49d2ae5967fc

Contents?: true

Size: 1.24 KB

Versions: 24

Compression:

Stored size: 1.24 KB

Contents

/**
 * jQuery Plugin to obtain touch gestures from iPhone, iPod Touch and iPad, should also work with Android mobile phones (not tested yet!)
 * Common usage: wipe images (left and right to show the previous or next image)
 * 
 * @author Andreas Waltl, netCU Internetagentur (http://www.netcu.de)
 * @version 1.1.1 (9th December 2010) - fix bug (older IE's had problems)
 * @version 1.1 (1st September 2010) - support wipe up and wipe down
 * @version 1.0 (15th July 2010)
 */(function(e){e.fn.touchwipe=function(t){var n={min_move_x:20,min_move_y:20,wipeLeft:function(){},wipeRight:function(){},wipeUp:function(){},wipeDown:function(){},preventDefaultEvents:!0};t&&e.extend(n,t);this.each(function(){function i(){this.removeEventListener("touchmove",s);e=null;r=!1}function s(s){n.preventDefaultEvents&&s.preventDefault();if(r){var o=s.touches[0].pageX,u=s.touches[0].pageY,a=e-o,f=t-u;if(Math.abs(a)>=n.min_move_x){i();a>0?n.wipeLeft():n.wipeRight()}else if(Math.abs(f)>=n.min_move_y){i();f>0?n.wipeDown():n.wipeUp()}}}function o(n){if(n.touches.length==1){e=n.touches[0].pageX;t=n.touches[0].pageY;r=!0;this.addEventListener("touchmove",s,!1)}}var e,t,r=!1;"ontouchstart"in document.documentElement&&this.addEventListener("touchstart",o,!1)});return this}})(jQuery);

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
my_admin-0.1.13 app/assets/javascripts/my_admin/plugins/touchwipe/touchwipe.min.js
my_admin-0.1.12 app/assets/javascripts/my_admin/plugins/touchwipe/touchwipe.min.js
my_admin-0.1.11 app/assets/javascripts/my_admin/plugins/touchwipe/touchwipe.min.js
my_admin-0.1.10 app/assets/javascripts/my_admin/plugins/touchwipe/touchwipe.min.js
my_admin-0.1.9 app/assets/javascripts/my_admin/plugins/touchwipe/touchwipe.min.js
my_admin-0.1.8 app/assets/javascripts/my_admin/plugins/touchwipe/touchwipe.min.js
my_admin-0.1.7 app/assets/javascripts/my_admin/plugins/touchwipe/touchwipe.min.js
my_admin-0.1.6 app/assets/javascripts/my_admin/plugins/touchwipe/touchwipe.min.js
my_admin-0.1.5 app/assets/javascripts/my_admin/plugins/touchwipe/touchwipe.min.js
my_admin-0.1.4 app/assets/javascripts/my_admin/plugins/touchwipe/touchwipe.min.js
my_admin-0.1.3 app/assets/javascripts/my_admin/plugins/touchwipe/touchwipe.min.js
my_admin-0.1.2 app/assets/javascripts/my_admin/plugins/touchwipe/touchwipe.min.js
my_admin-0.1.1 app/assets/javascripts/my_admin/plugins/touchwipe/touchwipe.min.js
my_admin-0.0.12 app/assets/javascripts/my_admin/plugins/touchwipe/touchwipe.min.js
my_admin-0.0.11 app/assets/javascripts/my_admin/plugins/touchwipe/touchwipe.min.js
my_admin-0.0.10 app/assets/javascripts/my_admin/plugins/touchwipe/touchwipe.min.js
my_admin-0.0.9 app/assets/javascripts/my_admin/plugins/touchwipe/touchwipe.min.js
my_admin-0.0.8 app/assets/javascripts/my_admin/plugins/touchwipe/touchwipe.min.js
my_admin-0.0.7 app/assets/javascripts/my_admin/plugins/touchwipe/touchwipe.min.js
my_admin-0.0.6 app/assets/javascripts/my_admin/plugins/touchwipe/touchwipe.min.js