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

Creating mobile-compatible forms


jQuery Mobile provides a wide array of form components that are similar to the jQuery UI offering but optimized for mobile devices. This recipe provides examples of the more commonly used form elements so that you can re-use them at your convenience.

Getting ready

Within the chapter10 folder you created earlier, create recipe-8.html.

How to do it…

To learn what form elements are made available by jQuery Mobile and how to use them, perform each of the following steps:

  1. Create a simple jQuery Mobile website to hold all the examples. Add the following HTML code to recipe-8.html:

    <!DOCTYPE html>
    <html>
    <head>
        <title>Chapter 10 :: Recipe 8</title>
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <link rel="stylesheet" href="jquery-mobile/jquery.mobile.min.css" />
        <script src="jquery.min.js"></script>
        <script src="jquery-mobile/jquery.mobile.min.js"></script>
    &lt...