I’m creating a web-database driven offline web-app targeted at iOS devices. I’m trying to use jQuery Mobile, but I have a problem in creating the various forms.
The form options are taken from a database query, so they are inserted into the page after it has loaded, so the “jQuery-Mobilification” doesn’t happen. Taking a quick look through the source, there doesn’t seem to be any obvious way to call into this at this stage (of course it’s an alpha release, and I think this would be a reasonably common request, so I’m hopeful it will come). Is there some kind of workaround I can put in to do this? I’m particularly interested in radio buttons, check boxes and select lists.
This is messing around in undocumented internals, but the following is working for me:
There are equivalent methods for buttons, checkboxes etc.
Have a look at the
_enchanceControls[sic] method in http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.js.Update for 1.0Alpha2: As can be expected when playing around with the internals of a library, this no longer works in the latest version. Changing
customTextInput()totextinput()fixes it a bit, but the theme isn’t fully applied for some reason. We were warned…