I am pleased to say that after much procrastinating and beating around the bush, I have finally found time to sit down and completely re-write the jQuery mobile events I mentioned in my earlier post (see here for more information). Details of the events can be found after the jump.
Regular visitors will probably recall that some time ago I released a series of jQuery plugins bundled into a single file which allowed cross-device handling of events (i.e. touch and mouseclick formalisation). After some reason blog comments inspired me to progress the project further, I’m pleased to say that everything has now been completely re-written and the first alpha release can be found on my Github repository.
Here’s an outline of the events that I have provided:
doubletap. This event will be fired twice when
doubletapis used, so it is recommended to use
singletapin this case.
tapthis event is only triggered once we are certain the user has only tapped the target element a single time. This will not be triggered by
tap. Since we need to run some tests to make sure the user isn’t double tapping or holding a tap on the target element, this event is fired with a short delay (currently of 500 milliseconds).
swipe, except only called when the user swipes their finger in an upward direction on the target element (i.e. bottom to top)
swipe, but triggered only when the user swipes their finger left to right on the target element.
swipe, but triggered only when the user swipes their finger top to bottom on the target element.
swipe, but triggered only when the user swipes their finger from right to left.
orientationchangeevent. In the latter instance, a detection of the viewport size change occurs.
Please check out the repo over on GitHub, and don’t forget to fork me while you’re there. Feedback would certainly be most gratefully received.