auto collapse html content
<p><br/>
Perhaps you can't help me.
I want to auto create <strong>jquerymobile collapses</strong> (<a href="http://jquerymobile.com/test/docs/content/content-collapsible.html" rel="nofollow">http://jquerymobile.com/test/docs/content/content-collapsible.html</a>) with javascript a content like this :</p>

<pre><code>&lt;h3&gt;title 1&lt;/h3&gt;
some text

&lt;h3&gt;title 2&lt;/h3&gt;
some text

&lt;h3&gt;title 3&lt;/h3&gt;
some text
</code></pre>

<p>This content come from JSON that i can't manipulate before.<br/>I must wrap each :</p>

<pre><code>&lt;h3&gt;title&lt;/h3&gt;
some text
</code></pre>

<p>with this :</p>

<pre><code>&lt;div data-role="collapsible" data-collapsed="true"&gt;&lt;/div&gt;
</code></pre>

<p>but i can't do this... Help !</p>
