I am making a hybrid mobile app and I want to apply the jQueryMobile-initialize method after I get html back from a webservice.. (by "hybrid mobile app" I mean that I start w an html page, use jQueryMobile for styling, and use ajax calls to web services to get data on button clicks etc. Finally, I fold all that into a native app.)
So, does anyone know if there is something like (pseudo)
$.initWithJQueryMobile($('#my_div_id'))
NOTE: I am not going to a new, data-role=page when I do the ws request/response.
Background: As you may know, when it initializes an html file, jqm changes this
<select id="116" data-role="slider" >
<option value='no'>No</option>
<option value='yes'>Yes</option></select>
into this
I want to do that AFTER my webservice returns - long after the pagecreate event has fired.
When you click or tap the flip toggle (they call it), it toggles between Yes and No.
To achieve this jqm is radically re-writing the dom with spans, divs and styles AND applying a javascript method to the onclick for the flip toggle.
I can steal the html from page-view-source, so if someone knows the jqm js method that makes it toggle I can take it from there (I know, big hack). Or …. is there an $.initWithJQueryMobile() function that we can use?