I'm dynamically filling a <ul data-role="listview">
then calling location.href="#Results"
where the list is, and finally listview('refresh')
.
All that is done in the success callback of an Ajax request from the same page. It works more or less but I'm getting the following error:
Uncaught cannot call methods on listview prior to initialization; attempted to call method 'refresh'
I guess jQuery mobile did not construct the listview yet. What could I do?