diff --git a/demos/Click_vs_swipe.html b/demos/Tap_vs_swipe.html similarity index 67% rename from demos/Click_vs_swipe.html rename to demos/Tap_vs_swipe.html index e5b2c2a..2856dba 100644 --- a/demos/Click_vs_swipe.html +++ b/demos/Tap_vs_swipe.html @@ -24,6 +24,8 @@ -

events: tap, swipe

+

events: tap, doubleTap, longTap, swipe

+

properties: longTapThreshold, doubleTapThreshold

You can also detect if the user simply clicks and does not swipe with the tap handler

- The tap handler is passed the original event object and the target that was clicked. -

- If you use the jquery.ui.ipad.js plugin (http://code.google.com/p/jquery-ui-for-ipad-and-iphone/) you can then also pickup + The tap, doubleTap and longTap handler are passed the original event object and the target that was clicked. +

+

If you use the jquery.ui.ipad.js plugin (http://code.google.com/p/jquery-ui-for-ipad-and-iphone/) you can then also pickup standard jQuery mouse events on children of the touchSwipe object.

-

tap replaces the old click handler for naming consistency. Since the introduction of event +

You can set the delay between taps which defines a double tap, and the length of a long tap with the doubleTapThreshold and longTapThreshold properties.

+ +

Note: If you assign both tap and double tap, you tap events will be delayed by the length of doubleTapThreshold as it waits to see if its a double before trigger the event

+ +

tap replaces the old click handler for naming consistency. Since the introduction of event triggering as well as callbacks, the plugin cannot trigger a click event as it clashes with the jQ click event, so both the event and callback are called tap. For backwards compatibility, the click callback will still work but there is no click event. You must use the tap event when binding with on or bind

@@ -69,7 +88,7 @@

events: tap, swipe

-
Swipe or Click me

+
Swipe, Tap, Double Tap or Long Tap me

Im just a child div

Im a child div with my own jQuery click handler

diff --git a/demos/js/main.js b/demos/js/main.js index 8f96907..e0ec7c3 100644 --- a/demos/js/main.js +++ b/demos/js/main.js @@ -12,7 +12,7 @@ var fileList = [ 'Trigger_handlers.html', 'Stop_propegation.html', 'Handlers_and_events.html', - 'Click_vs_swipe.html', + 'Tap_vs_swipe.html', 'Excluded_children.html', 'Page_zoom.html', 'Thresholds.html', diff --git a/docs/files.html b/docs/files.html index 595a56b..97b30ac 100644 --- a/docs/files.html +++ b/docs/files.html @@ -87,7 +87,7 @@

File Index