[
https://issues.apache.org/jira/browse/CB-13811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
jcesarmobile closed CB-13811.
-----------------------------
Resolution: Not A Problem
This is not a Cordova problem, it's a basic jQuery mobile knowledge problem.
jQuery doesn't style the things you append after jQuery is ready. By appending
before device ready you are also doing it before jQuery ready, so it's styled,
once jQuery is ready it won't style new elements. To style the elements you
append jQuery offers different ways based on the version used, read their docs.
> jquery-mobile styles lost, when appending <input> with jquery
> -------------------------------------------------------------
>
> Key: CB-13811
> URL: https://issues.apache.org/jira/browse/CB-13811
> Project: Apache Cordova
> Issue Type: Bug
> Components: cordova-android
> Affects Versions: cordova-android-7.0.0
> Reporter: Piotr
> Assignee: Joe Bowser
> Priority: Major
> Labels: JQueryMobile, jquery
> Attachments: input1.png, input2.png
>
>
> Not sure, if this should be considered a bug; it seems unlikely, that nobody
> has encountered it..
> When <input> fields are added with jquery after 'onDeviceReady' in 'index.js'
> jquery mobile styles are lost.
> minimal example:
> index.html:
> ...
> <div id="myone" class="ui-field-contain">
> </div>
> ...
> index.js:
> ...
> onDeviceReady: function() {
> $("#myone").append("<input type='text' data-clear-btn='true'>");
> }, ...
> see input2.png
> If the <input> fields are added before 'onDeviceReady' they are styled
> appropriately.
> see input1.png
>
> This is akward and I couldn't find any workaround. Does cordova style
> <input>s in a special way? Some solution would be highly appreciated!
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]