File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -20,3 +20,4 @@ This won't have any effect on non-touch devices. You can rely on:
2020Global setting:
2121
2222 $.detectSwipe.threshold // The number of pixels your finger must move to trigger a swipe event. Defaults is 20.
23+ $.detectSwipe.preventDefault // Should touchmove events be prevented? Defaults to true.
Original file line number Diff line number Diff line change 11/**
2- * jquery.detectSwipe v2.0
2+ * jquery.detectSwipe v2.1
33 * jQuery Plugin to obtain touch gestures from iPhone, iPod Touch, iPad and Android
44 * http://github.com/marcandre/detect_swipe
55 * Based on touchwipe by Andreas Waltl, netCU Internetagentur (http://www.netcu.de)
66 */
77( function ( $ ) {
88
99 $ . detectSwipe = {
10- version : '2.0 .0' ,
10+ version : '2.1 .0' ,
1111 enabled : 'ontouchstart' in document . documentElement ,
12+ preventDefault : true ,
1213 threshold : 20
1314 } ;
1415
1718 isMoving = false ;
1819
1920 function onTouchMove ( e ) {
20- e . preventDefault ( ) ;
21+ if ( $ . detectSwipe . preventDefault ) { e . preventDefault ( ) ; }
2122 if ( isMoving ) {
2223 var x = e . touches [ 0 ] . pageX ;
2324 var y = e . touches [ 0 ] . pageY ;
You can’t perform that action at this time.
0 commit comments