Working with physical events
For the first part of this chapter, we will focus on the physical events or the events related to touch, and the other actions done with a device.
Tip
For those of you who have been testing jQuery Mobile using a regular browser, please note that some of the following examples will not work properly on a desktop browser. If you wish, you can download and install emulators for various mobile phone types. For example, Android has an SDK that supports creating virtual mobile devices. Apple also has a way to simulate an iOS device. Setting up and installing these emulators are beyond the scope of this chapter, but it is certainly an option. Of course, you can use a real hardware device as well.
Another option is to consider using the developer tools in your browser. Chrome, for example, lets you emulate touch events. See the DevTools documentation for more information.
Let's discuss the physical events that include the following:
tap
andtaphold
: Thetap
event represents...