jquery change text on div
<p>I need to change only the text inside the div, where there is other elements inside it. I tried the <code>text</code> method but it changed the whole content of the div.</p>

<p>Example div:</p>

<pre><code>&lt;div class="mydiv"&gt;
MY TEXT HERE
&lt;ul&gt;
   &lt;li&gt;BLAH&lt;/li&gt;
   &lt;li&gt;BLAH&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</code></pre>

<p>This is what I have tried for now: <code>$(".mydiv").text("MY NEW TEXT");</code></p>
