.listview() is not a function error when creating a dynamic listview in jquery mobile

前端 未结 1 1588
独厮守ぢ
独厮守ぢ 2020-12-04 02:21

I am trying to create a dynamic listview in jquery mobile, after querying the facebook api, to retrieve a user\'s news feed. Here\'s part of my mark up:

mar         


        
相关标签:
1条回答
  • 2020-12-04 03:05

    You're not using jQuery-selector the right way. To target an element with an id, use $('#element_id') and for an element with a class $('.element_class'). So, your selection should be as below.

    $('#newsfeedposts').append(markup);
    

    and then

    $('#newsfeedposts').listview('refresh');
    
    0 讨论(0)
提交回复
热议问题