Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add Image on the Button

Any one help me. How to add the image on the button? I am using following code for create a button. I want to display the image instead of "refresh". is it possible to do this? Thanks in advance.

<div data-role="button" data-iconpos="right" id="searchResultRefresh" data-icon="refresh"> 
 refresh </div>
like image 395
Finder Avatar asked Nov 30 '25 15:11

Finder


1 Answers

You are interested in this document:

http://jquerymobile.com/demos/1.0a2/#docs/buttons/buttons-icons.html

Custom icons are mentioned at the bottom. Take one of the existing ui-icon-sth classes and change the offsets to refer to the end of the icons file and then add your icon there if you want to reuse it a lot.

If not - just change the image link in the copied CSS and remove background-position definition.

like image 148
naugtur Avatar answered Dec 03 '25 05:12

naugtur



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!