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

Adding mobile-friendly lists


There have been various recipes throughout this cookbook that utilize HTML lists to present data in a simple and effective way. jQuery Mobile allows developers to quickly add mobile-and touch-friendly lists to their jQuery Mobile website. This recipe provides you with multiple examples of the more common types of lists made available by jQuery Mobile. You can copy and re-use the code for these lists at your convenience.

Getting ready

Within the chapter10 folder you created earlier, create a single HTML file called recipe-6.html.

How to do it…

To understand how to add different types of lists that are mobile-friendly, perform the following steps:

  1. Create a basic jQuery Mobile site by adding the following HTML to recipe-6.html:

    <!DOCTYPE html>
    <html>
    <head>
        <title>Chapter 10 :: Recipe 6</title>
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <link rel="stylesheet" href="jquery-mobile/jquery.mobile...