benmajor / jQuery-Touch-Events

A collection of mobile event plugins for jQuery.
MIT License
699 stars 225 forks source link

possibility to set threshold (or any other settings) globally #134

Closed russ666 closed 6 years ago

russ666 commented 7 years ago

it could be a good feature to set any settings globally once

benmajor commented 7 years ago

Yes, this is a good suggestion, and something I will add to 2.0.

benmajor commented 6 years ago

This is now fixed with v2.0.0. You can access the setters using the new $.touch namespace. The following setters are supported:

Set the X threshold for swipe events: $.touch.setSwipeThresholdX(threshold);

Set the Y threshold of swipe events: $.touch.setSwipeThresholdY(threshold)

Set the double tap interval: $.touch.setDoubleTapInt(interval);

Set the taphold threshold: $.touch.setTapHoldThreshold(threshold);

Set the pixel range for taps: $.touch.setTapRange(ranger);