Hello all,
I baffled by an issue that I'm hoping you can help me on.
I am trying to generate dynamic data in a listview. On the desktop browser, everything works fine. On the device (iOS on Phonegap), I see a blank listview.
In my first html, I get data for the list view. Then I do $.mobile.changePage("#listviewpage")
In "pagecreate" of this page, I create the string representing the listview:
var list = "<ul data-role='listview' id='mylist'....<li>first></li><li>second</li>...</ul>"
$("#listviewpage #listcontainer").html(list);
$("#mylist").listview();
$("#mylist").listview("refresh");
$("#listviewpage").page()
The above results in a blank page on the device. If I later go ahead and add a new list item and refresh the list, it reappears. There seems to be some timing related issue with the events thrown by .mobile.changePage() and initialization of the list. I can't seem to be able to put a finger on it.