问题
I am adding
回答1:
jQM Docs:
- http://jquerymobile.com/demos/1.0/docs/lists/docs-lists.html
Updating lists If you add items to a listview, you'll need to call the
refresh()
method on it to update the styles and create any nested lists that are added. For example:$('#mylist').listview('refresh');
Note that the
refresh()
method only affects new nodes appended to a list. This is done for performance reasons. Any list items already enhanced will be ignored by the refresh process. This means that if you change the contents or attributes on an already enhanced list item, these won't be reflected. If you want a list item to be updated, replace it with fresh markup before calling refresh.
来源:https://stackoverflow.com/questions/8743931/jquery-mobile-does-not-render-list-after-jquery-template-was-inserted