I’m inserting a form via ajax dynamically into the page. After inserting it into the dom tree, i would like to reinitialize the jquery mobile to style the form. I had a look into http://jquerymobile.com/test/docs/api/events.html but since the documentation is pretty unhelpful for jquery mobile I’m not able to find the correct event.
Share
After you have added the form to the DOM, use
.trigger('create');on the form to initialize any widgets (form elements) you’ve just added:Here is a demo: http://jsfiddle.net/TBRXk/