I am trying to add dynamic div syntax using jQuery mobile, but after adding it CSS is not applied even when updating .
This is an example .
Code:
$(function() { $("#data").append('<div data-role="collapsible"><h3>Div2</h3><p>Content Div2...</p></div>'); $("#data").listview("refresh"); });
Use collapsibleset() instead of listview("refresh") :
collapsibleset()
listview("refresh")
$("#data").collapsibleset();
See DEMO .
I use this method
try{ $("#data").listview("refresh"); }catch{ $("#data").listview(); }finally{ $('[data-role=collapsible]').collapsible(); }
This issue occurs when an item is added to a dynamic
Source: https://habr.com/ru/post/1469361/More articles:Storing a wav file in an array - c #Necessity Explanation: Organization with objects in the contact list (Javascript, Codecademy) - javascriptGetting VS2010 / Resharper before "git move" during refactoring - gitHow to embed typescript files in VIM - syntaxgit-add does not work with wildcards - gitJSF2.0, how do you pass viewParam to the scope of the bean request when using commandButton? - faceletsDown-sampling time series in pandas - pythonNode -Webkit Facebook integration - node.jsAmazon OpsWorks RVM Custom Cookbook - ruby | fooobar.comUsing NDK gdb in Cygwin, how do I interrupt (interrupt) debuggee - android-ndkAll Articles