jQuery Mobile-具有data-filter ="true"的listview()和ajax内容 [英] jQuery Mobile - listview() with data-filter="true" and ajax content
本文介绍了jQuery Mobile-具有data-filter ="true"的listview()和ajax内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我的html:
<ul data-role="list-view" data-filter="true"></ul>
我的JS向ul加载数据,然后调用listview().
My JS loads the ul with data and then I call listview().
$('#page').live('pagebeforecreate', function(){
// My Ajax code
});
$('#page').live("pageinit", function(){
$('#page ul').listview();
});
除了顶部的搜索栏没有出现以外,其他方法均有效.我想念什么?
That works except the search bar at the top doesn't appear. What am I missing?
推荐答案
您拥有
data-role="list-view"
正确的方法
data-role="listview"
这就是为什么顶部搜索栏没有出现的原因.
that is why the search bar at the top doesn't appear.
这篇关于jQuery Mobile-具有data-filter ="true"的listview()和ajax内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文