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

Building a complete static website


This recipe will show you how to quickly create a simple static website using jQuery Mobile. Using the template created in the previous recipe, it only takes adding additional elements with the correct roles to create extra pages and the navigation between them.

Getting ready

Create recipe-2.html in the chapter10 folder you created earlier and ensure you have your newly created jQuery Mobile template ready.

How to do it…

To create a functional mobile website using jQuery Mobile, perform the following steps:

  1. Copy the jQuery Mobile template you created earlier into recipe-2.html and remove everything within the <body> tags as shown in the following code snippet:

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