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 a basic mobile website template


This recipe will show you what the basic layout for a simple jQuery Mobile web page looks like. You will also be able to use this HTML page as a template for future jQuery mobile projects.

Getting ready

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

How to do it…

Insert the following HTML code into recipe-1.html to create a very basic jQuery Mobile single page website:

<!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.min.js"></script>
    <script src="jquery-mobile/jquery.mobile.min.js"></script>
</head>
<body>
<div data-role="page">
    <header data-role="header">
        <h1>Chapter 10 :: Recipe 1 :: jQuery Mobile Webpage...