I am trying to add a list view to a jQuery mobile site after the site has been loaded. Merely adding it to the DOM doesn’t work because it doesn’t parse it for data-role tags once it has been loaded. Here is an example: http://jsfiddle.net/Xeon06/h2gfT/2/
My question is, how do I refresh it? I’ve found numerous similar questions with answers ranging from using .refresh (which doesn’t work because the element is never initialized as a list view) to .page (which doesn’t work at all and I have no idea why). I am using the latest version of jQuery mobile at the time of writing, 1.02b.
Thanks.
You can call
.listview()on your element.Updated fiddle