I’m trying to add a custom class to the jQuery Mobile theme. The CSS should look something like this:
.ui-icon-form-ok-f {
background-color: #f09000 !important;
data-icon: check !important;
}
but how can I get jQuery Mobile to recognize this? Thanks.
How to recognize a custom icon style to jqm
For each elements of any
When you set
[data-icon=AAA]on buttons, jqm creates<span class="ui-icon-AAA">inside the buttons.That is:
When loads this html, jqm creates like this:
So, jqm can recognize your custom-icon-class.
By applying this way, pages can load “ui-icon-alt”
Jqm renders Black icons (Alt icon color) instead of White icons.
For each theme of any
If you want to ‘customize’ icon for each theme of any, you should be loaded js like this:
*YOUR CUSTOM NAME (eg.form-ok, form-ng …)
OR
The former adds the same class to icons in “theme g” and “theme f”, the latter adds respectively a separate class to icons in “theme g” and “theme f”.
At last
i’ve to prepare for some samples.