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

The basics of jQuery Mobile theming

Theming in jQuery Mobile is straightforward and simple to use for the developer, but it is pretty elaborate behind the scenes. Luckily, there will rarely be a time when you need to know everything that's being done for you. However, it's worth a little bit of our time to understand how it works.

Out of the box, jQuery Mobile comes with a theme set comprising two color swatches, each associated with a letter (A and B). The theme contains a series of base CSS classes that can be applied at will to nearly any element and contain global settings for width, height, border radius, and shadows. The individual swatches contain specific information about color, fonts, and so on.

Additional swatches can be added to the original swatches from C to Z, or the original swatches can be replaced or overridden at will. This system allows for a total of 26 distinct swatches, allowing for millions of possible combinations of theme colors, styles, and patterns. You apply a...