I am struggling to get JQM to reinitialize a jquery page with a listview that contains form fields.
One of the form elements is initialized as part of JQM’s normal initialization process, that is displaying correctly with all the correct class applied to all elements.
The others are all added dynamically using JQ’s append
When elements are added dynamically I cannot find the correct method to reinitialize the list to apply the styling to everything, the fieldcontain div the label & the textarea.
I have prepared an example to show the different methods to reinitialize the elements that I’ve tried based on other questions found on SO and around the web.
http://jsfiddle.net/robaldred/UPsQr/
In my example, row 5 is correctly initialize, however it requires calling the fieldcontain() method the textinput() method and manually add the ui-input-label class to the label. This feels like a lot of messing about, I must be missing something.
Trigger a create event on the page like this:
Referenece: http://jquerymobile.com/demos/1.0/docs/pages/page-scripting.html
Updated your fiddle – http://jsfiddle.net/UPsQr/2/