知道如何在 JQueryMobile 中实现加载更多选项。在我的应用程序中,我需要提取大量数据,并希望加载前 20 条数据,并让用户通过单击 Listview 最后一行上的“加载更多”数据选项来加载更多数据。
最佳答案
这应该有效:
$('#loadmore-link').click(function() {
// remove the "load more" link
$(this).remove();
// get more LI elements (probably with a $.get())
$('ul').append('<li>More list items</li>');
// update the list view
$('ul').listview('refresh');
});
关于JQuery Mobile 加载更多选项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5005670/