title: How to get nodeType using jquery
body: <p>I want to get nodeType and then compare it to where it is text node or element node.</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;script type="text/javascript" src="jquery-1.7.2.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  $(function(){
      var mm= $('.jj')
      alert(mm.nodeValue)
      })
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div class="jj"&gt;value&lt;/div&gt;
  &lt;/body&gt;
  </code></pre>