css3 - JQuery Mobile not applied -
i'm having troubles jquerymobile because want implement widgets themes , color of widgets not well-implemented.
here's photo show what's happening: 
and correct widget example that:

if add jquerymobile widgets dynamically theme not well-added if html on file (not added dynamically javascript) theme looks well. here's code use add widgets:
function cesta_insert_html(){ var cesta_bought = $('body').data('cesta_list'); cesta_bought.foreach(function(element, index){ image = get_product_info(element[0].id, 'data' + $('body').data('clicked_listview_item')); $('#cesta_view').append('<div data-role="collapsible-set" id="collapsible" data-theme="a" data-content-theme="c"><div data-role="collapsible" data-collapsed="false"><h3 id="title_collapsible">'+image.pname+'</h3><center><div id=image_cesta><img src=data:imajpeg;base64,'+image.pimage+' alt="image"></div><div data-role="fieldcontain"><fieldset data-role="controlgroup"><input type="range" class="slider" name="slider" value="0" min="0" max="100" data-highlight="false"></fieldset></div></center><div class="ui-grid-a"><div class="ui-block-a"><a id=savechangescesta data-role="button" type="submit" >guardar cambios</a></div><div class="ui-block-b"><a id="deletecesta" type="submit" >eliminar de cesta</a></div></div></div></div><br><br>'); }); } thanks!
working example: http://jsfiddle.net/gajotres/6ng2n/
you combining several different widgets, enhance markup should run trigger('create').
read more in other answer: jquery mobile: markup enhancement of dynamically added content
$('[data-role="content"]').append('<div data-role="collapsible-set" id="collapsible" data-theme="a" data-content-theme="c"><div data-role="collapsible" data-collapsed="false"><h3 id="title_collapsible">image</h3><center><div id=image_cesta><img src=data:imajpeg;base64,image alt="image"></div><div data-role="fieldcontain"><fieldset data-role="controlgroup"><input type="range" class="slider" name="slider" value="0" min="0" max="100" data-highlight="false"></fieldset></div></center><div class="ui-grid-a"><div class="ui-block-a"><a id=savechangescesta data-role="button" type="submit" >guardar cambios</a></div><div class="ui-block-b"><a id="deletecesta" type="submit" >eliminar de cesta</a></div></div></div></div><br><br>'); $('#index').trigger('create');
Comments
Post a Comment