May 21, 2021 jQuery Mobile
In jQuery Mobile, to add an icon to a button, use the data-icon property:
Tip: You can also use the data-icon property in the element of the .lt;button> or the .lt;input> element.
Here's a list of all the icons available from jQuery Mobile:
Attribute value | describe | icon | Example |
---|---|---|---|
data-icon="arrow-l" | Left arrow | try it | |
data-icon="arrow-r" | Right arrow | try it | |
data-icon="arrow-u" | Arrow | try it | |
data-icon="arrow-d" | Arrow | try it | |
data-icon="plus" | plus | try it | |
data-icon="minus" | Minuscular | try it | |
data-icon="delete" | delete | try it | |
data-icon="check" | an examination | try it | |
data-icon="home" | front page | try it | |
data-icon="info" | information | try it | |
data-icon="grid" | grid | try it | |
data-icon="gear" | tool | try it | |
data-icon="search" | search | try it | |
data-icon="back" | Retreat | try it | |
data-icon="forward" | go ahead | try it | |
data-icon="refresh" | renew | try it | |
data-icon="star" | Asterisk | try it | |
data-icon="alert" | warn | try it |