Book Image

jQuery Mobile Web Development Essentials-Third Edition - Third Edition

By : Raymond Camden, Andy Matthews
Book Image

jQuery Mobile Web Development Essentials-Third Edition - Third Edition

By: Raymond Camden, Andy Matthews

Overview of this book

jQuery Mobile is a HTML5-based touch-optimized web framework. jQuery Mobile can be used to build responsive cross-platform websites and apps for a wide range of smartphones, tablets, and desktop devices. The jQuery Mobile framework can be integrated with other mobile app frameworks such as PhoneGap, IBM Worklight, and more. Introduction to jQuery Mobile explains how to add the framework to your HTML pages to create rich, mobile-optimized web pages with minimal effort. You’ll learn how to use jQuery Mobile’s automatic enhancements and configure the framework for customized, powerful mobile-friendly websites. We then dig into forms, events, and styling. You'll see how jQuery Mobile automatically enhances content, and will find out how to use the JavaScript API to build complex sites. We’ll introduce you to how jQuery Mobile can be themed as well looking into how JavaScript can be used for deep sets of customizations. The examples are ready to run and can be used to help kick-start your own site. Along the way, you will leverage all the concepts you learn to build three sample mobile applications.
Table of Contents (20 chapters)
jQuery Mobile Web Development Essentials Third Edition
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Index

Working with multiple files


In an ideal world, we could build an entire website with one file. We would never have to perform revisions, and we would be done with every project by 2 P.M. on Fridays. But in the real world, we have to deal with lots of files, lots of revisions, and, unfortunately, lots of work. In the earlier code listing, you saw how we could include two pages within one file. jQuery Mobile handles this easily enough. But you can imagine that this would get unwieldy after a while. While we could include 10, 20, or even 30 pages, this will make the file difficult to work with and make the initial download for the user that much slower.

To work with multiple pages and files, all we need to do is make a simple link to other files in the same domain as our first file. We can even combine the first technique (two pages in one file) with links to the other files. In listing 2-2, we've modified the first example to add a link to a new page (as mentioned previously, we are only listing...