defaults

$.fn.swipe. defaults

Source:
Properties:
Name Type Attributes Default Description
fingers int <optional>
1 The number of fingers to detect in a swipe. Any swipes that do not meet this requirement will NOT trigger swipe handlers.
threshold int <optional>
75 The number of pixels that the user must move their finger by before it is considered a swipe.
cancelThreshold int <optional>
null The number of pixels that the user must move their finger back from the original swipe direction to cancel the gesture.
pinchThreshold int <optional>
20 The number of pixels that the user must pinch their finger by before it is considered a pinch.
maxTimeThreshold int <optional>
null Time, in milliseconds, between touchStart and touchEnd must NOT exceed in order to be considered a swipe.
fingerReleaseThreshold int <optional>
250 Time in milliseconds between releasing multiple fingers. If 2 fingers are down, and are released one after the other, if they are within this threshold, it counts as a simultaneous release.
longTapThreshold int <optional>
500 Time in milliseconds between tap and release for a long tap
doubleTapThreshold int <optional>
200 Time in milliseconds between 2 taps to count as a double tap
swipe function <optional>
null A handler to catch all swipes. See $.fn.swipe#event:swipe
swipeLeft function <optional>
null A handler that is triggered for "left" swipes. See $.fn.swipe#event:swipeLeft
swipeRight function <optional>
null A handler that is triggered for "right" swipes. See $.fn.swipe#event:swipeRight
swipeUp function <optional>
null A handler that is triggered for "up" swipes. See $.fn.swipe#event:swipeUp
swipeDown function <optional>
null A handler that is triggered for "down" swipes. See $.fn.swipe#event:swipeDown
swipeStatus function <optional>
null A handler triggered for every phase of the swipe. See $.fn.swipe#event:swipeStatus
pinchIn function <optional>
null A handler triggered for pinch in events. See $.fn.swipe#event:pinchIn
pinchOut function <optional>
null A handler triggered for pinch out events. See $.fn.swipe#event:pinchOut
pinchStatus function <optional>
null A handler triggered for every phase of a pinch. See $.fn.swipe#event:pinchStatus
tap function <optional>
null A handler triggered when a user just taps on the item, rather than swipes it. If they do not move, tap is triggered, if they do move, it is not.
doubleTap function <optional>
null A handler triggered when a user double taps on the item. The delay between taps can be set with the doubleTapThreshold property. See $.fn.swipe.defaults#doubleTapThreshold
longTap function <optional>
null A handler triggered when a user long taps on the item. The delay between start and end can be set with the longTapThreshold property. See $.fn.swipe.defaults#longTapThreshold
(function) [hold=null] A handler triggered when a user reaches longTapThreshold on the item. See $.fn.swipe.defaults#longTapThreshold
triggerOnTouchEnd boolean <optional>
true If true, the swipe events are triggered when the touch end event is received (user releases finger). If false, it will be triggered on reaching the threshold, and then cancel the touch event automatically.
triggerOnTouchLeave boolean <optional>
false If true, then when the user leaves the swipe object, the swipe will end and trigger appropriate handlers.
allowPageScroll string | undefined <optional>
'auto' How the browser handles page scrolls when the user is swiping on a touchSwipe object. See $.fn.swipe.pageScroll.

"auto" : all undefined swipes will cause the page to scroll in that direction.
"none" : the page will not scroll when user swipes.
"horizontal" : will force page to scroll on horizontal swipes.
"vertical" : will force page to scroll on vertical swipes.
fallbackToMouseEvents boolean <optional>
true If true mouse events are used when run on a non touch device, false will stop swipes being triggered by mouse events on non touch devices.
excludedElements string <optional>
".noSwipe" A jquery selector that specifies child elements that do NOT trigger swipes. By default this excludes elements with the class .noSwipe .
preventDefaultEvents boolean <optional>
true by default default events are cancelled, so the page doesn't move. You can disable this so both native events fire as well as your handlers.
The default configuration, and available options to configure touch swipe with. You can set the default values by updating any of the properties prior to instantiation.