SO jQuery Fiddle
Test Fiddle mainly for SO Questions jQuery 1.4.4
by Nick Craver
HTML
<script src="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css">
<div data-role="page" data-theme="b" id="page">
<div data-role="content">
<div data-role="collapsible">
<h3>I'm a header</h3>
<p>I'm the collapsible content. By default I'm open and displayed on the page, but you can click the header to hide me.</p>
</div>
</div>
</div>
JavaScript
$('<div data-role="collapsible"><h3>Title</h3><p>Content</p></div>').appendTo('[data-role="content"]').page()