Book Image

jQuery Mobile First Look

Book Image

jQuery Mobile First Look

Overview of this book

Table of Contents (17 chapters)
jQuery Mobile First Look
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Understanding page structure


The jQuery Mobile page structure is based on the HTML5 standard, and is optimized to make use of most of its tags, attributes, and elements out of the box.

At this point, one may ask what the problem is if we can follow HTML5 directives and code the page like we have always done until now.

The reason we must take a close look at how jQuery Mobile processes the pages and their standard layout is because the frameworks needs and recognizes some elements depending on some attributes we have to specify.

So, there are a couple of things to bear in mind:

  1. Any jQuery Mobile page must start with an HTML5 doctype, so we can get the best out of the framework.

    <!DOCTYPE html>
  2. Tags such as <html>, <head>, <title>, and <body> still serve their goal, and must be included in the code.

  3. In the <head>, references to the jQuery Mobile stylesheet, jQuery, and jQuery Mobile are required.

    Note

    Your link to jQuery and jQuery Mobile can point to either a CDN...