I\'m using regular jQuery and I have an event handler that looks like this:
$(\'#someID\').on({
click: SomeFunction
}, \'.SomeClass\');
<
Andrew gives the correct answer.
In general,
"touchstart" will be triggered when we perform "click","swipe","scroll" etc. However, as you know, what we want to capture is "click".
What FastClick.js does is to define a rule for "click". For example, we could set the condition below as a "click":
During time between "touchstart" and "touchend" is 200ms, in "touchmove", we find no distance has been moved.
The same, we could set the condition below as a "scroll":
During "touchstart" and "touchend", in "touchmove", we find distance has been moved on y axis but no x axis moving happens.