jQuery Mobile的列表视图刷新图标 [英] JQuery mobile listview refresh icon
本文介绍了jQuery Mobile的列表视图刷新图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我改变列表项的图标(礼
)和列表不刷新。在code快照:
I'm changing the icon on list item ('li'
) and the list is not refreshed. The code snapshot:
var listview = $('<ul data-role="listview" data-inset="true">');
...
var button = $('li#' + id, $.mobile.activePage);
button.attr('data-icon', 'check');
listview.listview('refresh');
但是,该列表显示旧图标。
However the list shows the old icon.
请帮助!
推荐答案
它可以这样做:
$('#test-list li').buttonMarkup({ icon: "home" });
下面是一个工作示例: http://jsfiddle.net/Gajotres/qgE6L/
Here's a working example: http://jsfiddle.net/Gajotres/qgE6L/
这篇关于jQuery Mobile的列表视图刷新图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文