Friday, March 2, 2012

Jquery Mobile - Theme Swatches in Jquery Mobile


jQuery Mobile has a robust theme framework that supports up to 26 sets of toolbar, content and button colors, called a "swatch". Just add a data-theme="e" attribute to any of the widgets on this page: page, header, list, input for the slider, or button to turn it yellow. Try different swatch letters in default theme from a-e to mix and match swatches.
Cool party trick: add the theme swatch to the page and see how all the widgets inside the content will automatically inherit the theme (headers don't inherit, they default to swatch A).
<a href="#" data-role="button" data-icon="star" data-theme="a">Button</a>


data-theme="a"data-theme="b"data-theme="c"data-theme="d"data-theme="e"

No comments:

Post a Comment