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

Creating fixed and fullscreen headers and footers

In the previous discussion about headers and footers, you saw a few examples on how buttons can be added. These buttons could be useful to navigate in your website. But what if a particular page is somewhat long? A blog entry, for example, could be quite long, especially when viewed on a mobile device. As the user scrolls, the header or footer could be offscreen. jQuery Mobile provides a way to create fixed position headers and footers.

With this feature enabled, the header and footer will always be visible. In a page with long content, the user can scroll up and down, but the headers and footers will remain in their proper positions. This only works with mobile browsers that support the fixed value for the CSS position property. For browsers that do not support this feature, the headers and footers will act normally. This feature can be enabled by adding data-position="fixed" to the div tag used for either the header or the footer. The code...