更改按钮jQuery Mobile的图标 [英] Change icon of button jQuery Mobile
本文介绍了更改按钮jQuery Mobile的图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将按钮的图标更改为另一个,但是不起作用.
I'm trying to change an icon of a button to another, but is not working.
我有:
<a id="login" href="login.html" data-role="button" data-icon="user" data-iconpos="top">Login</a>
我做到了:
$('#login').data('icon', 'user_highlight');
$('#login').button("refresh");
但是它没有用.我该怎么解决?
But it did not work. How can I solve?
推荐答案
请参阅此答案.基本上,您使用buttonMarkup.
See this answer. Basically you use buttonMarkup.
$('#login').buttonMarkup({ icon: "star" });
请参见工作示例小提琴
这篇关于更改按钮jQuery Mobile的图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文