Source: http://jquerymobile.com/demos/1.0a2/#docs/content/content-collapsible.html
When I add an element like this manually to my code, it is displayed properly.
But when I try to add it with jQuery like this:
$('body').append('<div data-role="collapsible"><h3>Title</h3><p>Content</p></div>');
It just displays title in h3 and the content below it, so not as a collapsible element.
How can I fix this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…