Book Image

jQuery Mobile Web Development Essentials - Third Edition

By : Raymond Camden, Andy Matthews
Book Image

jQuery Mobile Web Development Essentials - 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
About the Authors
About the Reviewer

Using jQuery Mobile utilities

Now that we've covered jQuery Mobile configuration, let's take a look at the utilities available to your applications. These are utilities provided by the framework, and they can be used in any application. You may not need them all (or any) on your website, but knowing they are there can help save time in the future.

Page methods and utilities

Let's begin looking at methods and utilities related to pages and the navigation between them. jQuery Mobile uses the concept of a page container to reference not one page or the current page, but the place where all the pages are loaded dynamically. In the current version of jQuery Mobile, there is one page container at any time, but in the future, this may change. Let's look at these methods and utilities related to the page container:

  • change(to, op tions): This method is used to change to another page. The first argument, to, can be either a string (the URL) or a jQuery DOM object. The options argument is an optional...