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:
markup += '<li><a href=""><img src="https://graph.facebook.com/' + id + '/picture">'+'<h4>' + name + '</h4><p>' + short_post +'....</p></a></li>';
I then have,
$(newsfeedposts).append(markup);
$(newsfeedposts).trigger("create");
however after that when i call the
$(newsfeedposts).listview("refresh");
I get a type error: TypeError: $(...).listview is not a function
my html div tag is this
<div data-role="content"> <div class ="post">
<ul data-role="listview" class="ui-listview" id="newsfeedposts" data-divider-theme="b" data-theme="a" data-overlay-theme="a" data-autodividers="true" data-inset="true">
</ul>
</div>
please let me know if you identify what Im doing wrong.This has been taking so longg...