jQuery Wrapping some string with conditional
<p>i have string need to be wrapped by tag <code>HTML</code> with conditional like this: </p>

<pre><code>&lt;h1&gt;Test&lt;/h1&gt;
</code></pre>

<p>Then nothing will happen</p>

<pre><code>&lt;h1&gt;Test Lagi&lt;/h1&gt;
</code></pre>

<p>Then the first word will be wrapped by <code>span</code>, result <code>&lt;h1&gt;&lt;span&gt;Test&lt;/span&gt; Lagi&lt;/h1&gt;</code></p>

<pre><code>&lt;h1&gt;Test Lagi ah&lt;/h1&gt;
</code></pre>

<p>Then only the first word will be wrapper by <code>span</code>, result:</p>

<pre><code>&lt;h1&gt;&lt;span&gt;Test&lt;/span&gt; Lagi ah&lt;/h1&gt;
</code></pre>

<p>How to do that in jQuery?</p>
