Book Image

jQuery 2.0 Development Cookbook

By : Leon Revill
Book Image

jQuery 2.0 Development Cookbook

By: Leon Revill

Overview of this book

Table of Contents (17 chapters)
jQuery 2.0 Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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:

  1. 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" />
        <link rel="stylesheet...