jQuery, how to test of a variable is a text node, containing no markup?
<p><a href="http://jsfiddle.net/DerNalia/zrppg/8/" rel="nofollow">http://jsfiddle.net/DerNalia/zrppg/8/</a></p>

<p>I have two lines of code that pretty much do the same thing</p>

<pre><code>var doesntbreak = $j("hello");
var breaks = $j("&amp;nbsp;"); 
</code></pre>

<p>​The first one doesn't error, but the second one throws this</p>

<pre><code>  Syntax error, unrecognized expression: &amp;nbsp;
</code></pre>

<p>should'nt they both behave the same?</p>

<p>any insight as to how to solve this?
in the actual method I'm using, <code>ele</code> is from the Dom, so it could eb a text node, or any other kind of node.</p>

<p>UPDATE:</p>

<p>the input to the function that I'm using that I noticed this takes selection from the dom.
updated example: <a href="http://jsfiddle.net/DerNalia/zrppg/11/" rel="nofollow">http://jsfiddle.net/DerNalia/zrppg/11/</a> &lt;- includes html markup.</p>

<p>So, I guess, my question is, how do I test if something is JUST a text node? and doesn't contain any markup?</p>
