jQuery: Returning the text from first-child or self
<p>I am trying to get the text inside an element and I only want to get the text if it's inside the first-child of a placehoder div or if there are no childrent and it's only text inside.<br />
So the two scenarios are:</p>

<pre><code>&lt;div id="wrap"&gt;text1&lt;/div&gt;
</code></pre>

<p>and</p>

<pre><code>&lt;div id="wrap"&gt;&lt;b&gt;text1&lt;/b&gt;&lt;b&gt;text2&lt;/b&gt;&lt;/div&gt;
</code></pre>

<p>So In both cases I want to get back <code>"text1"</code><br />
I know how to do it with 2 different queries but I am trying to unite them into one  </p>

<pre><code>$("#wrap :first-child").text()
$("#wrap").text()
</code></pre>
