So I am building a form dynamically with inputs styled with Jquery Mobile and was wondering if there was a way to trigger a refresh not related to Jquery. Basically, I am using a 3rd party plugin for a date picker and when the page loads, it is not getting the appropriate styles. Does anyone know of a method to refresh a single input to a form?
I don't want to reload the whole page, just refresh the form to apply the 3rd party styles to the single input. Sorry if this is a noob question, I am just getting started with JS and HTML5. Does anyone have any suggestions?
UPDATE: So the HTML string I am building and inserting into the form looks like this:
<input id="date-example" type="date" data-options="{'mode':'calbox'}" data-role="datebox" name="date-example">
This works perfectly if I add it to the page HTML, but not when I add it dynamcially into the form. The strings are identical which I can only assume means it is not refreshing with the CSS styles.
$(form).html(formFields); $(form).trigger('create');Which reloads the forms with the new inner HTML, applying the necessary CSS