JQueryMobile Loadmore options

笑着哭i 提交于 2020-01-12 10:36:10

问题


Any idea how to implement the load more option in JQueryMobile. In my application I need to pull lots of data and would like to load top 20 and make the user load more data by clicking the "load more" data option on the last row of Listview.


回答1:


This should work:

$('#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');
});


来源:https://stackoverflow.com/questions/5005670/jquerymobile-loadmore-options

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!