O'Reilly logo

jQuery and JavaScript Phrasebook by Brad Dayley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Specifying Different Theme Swatches

<div data-role="header" data-theme="b">   <h1>Teach</h1></div> <a data-role="button"   data-theme="a" src="next">Next</a>

The CSS files that come with jQuery Mobile include several versions of styling called swatches. A swatch is just a letter assignment that specifies what color scheme to use when rendering the mobile elements. Swatches are typically specified using the data-theme attribute. For example:

<div data-role="header" data-theme="b"><h1>Teach</h1></div>

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required