jQuery Mobile 1.2.0
I generate HTML using JavaScript ( $(selector).html(content) ), add it to the DOM and then show it ( $.mobile.changePage() ).
Then I call the AJAX call, get some data and re-generate the html (but the parent element, the same $(selector) , remains the same, I just change its html(...) ).
At the same time, poing HTML is not "strengthened" by jQM, and style is not imposed on it.
Now, according to the docs, I should just call the page() function on the parent element, i.e. $(selector).page() .
Other places in the documents involve creating the create event, i.e. $(selector).trigger("create") .
The problem is that the two above methods do not work - the jQM style is not applied.
Looking at the jQM code , I tried to fire the pagecreate event on this element, and it works , but it is not registered anywhere, so I am not sure about that., Especially regarding future releases of jQM.
For some positions in the documents I read, I can only call page() on the page.
Anyway, is there any short / standard way to tell jQM to “strengthen” the whole element and its children? Or will I just stay with pagecreate event?
Thanks!
source share