Book Image

jQuery Mobile Web Development Essentials-Third Edition - Third Edition

By : Raymond Camden, Andy Matthews
Book Image

jQuery Mobile Web Development Essentials-Third Edition - Third Edition

By: Raymond Camden, Andy Matthews

Overview of this book

jQuery Mobile is a HTML5-based touch-optimized web framework. jQuery Mobile can be used to build responsive cross-platform websites and apps for a wide range of smartphones, tablets, and desktop devices. The jQuery Mobile framework can be integrated with other mobile app frameworks such as PhoneGap, IBM Worklight, and more. Introduction to jQuery Mobile explains how to add the framework to your HTML pages to create rich, mobile-optimized web pages with minimal effort. You’ll learn how to use jQuery Mobile’s automatic enhancements and configure the framework for customized, powerful mobile-friendly websites. We then dig into forms, events, and styling. You'll see how jQuery Mobile automatically enhances content, and will find out how to use the JavaScript API to build complex sites. We’ll introduce you to how jQuery Mobile can be themed as well looking into how JavaScript can be used for deep sets of customizations. The examples are ready to run and can be used to help kick-start your own site. Along the way, you will leverage all the concepts you learn to build three sample mobile applications.
Table of Contents (20 chapters)
jQuery Mobile Web Development Essentials Third Edition
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Index

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 and taphold: The tap event represents...