Using touch-oriented events
Along with typical events available with jQuery, such as click
and hover
, jQuery Mobile makes touch-centric events available to the developer. Using these events, it is possible to add extra functionality to your mobile application for these additional user interactions. This recipe provides samples for many of these useful events that will allow you to re-use them at your convenience.
Getting ready
Within the web root of your web server, create recipe-7.html
and recipe-7.js
.
How to do it…
To learn which touch-centric events are available and how to use them, perform the following steps:
- Create a basic mobile website with an empty list by adding the following HTML to
recipe-7.html
. Make sure you update the references to the included libraries where required.<!DOCTYPE html> <html> <head> <title>Chapter 11 :: Recipe 1</title> <meta name="viewport" content="width=device-width, initial-scale=1" />...