title: accessing DOM elements by jQuery
body: <p>Say I have the following DOM element in my piece of code:</p>
  
  <pre><code>&lt;div id="test"&gt;
      &lt;div id="t2"&gt;
         Hi I am
         &lt;b&gt;Gopi&lt;/b&gt;
         and am 20 years old.
         &lt;p id="div2"&gt;
           &lt;button onclick="alert('lol')"&gt;Check&lt;/button&gt;
         &lt;/p&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Suppose I wanted to traverse through the contents of div#t2.</p>
  
  <p><code>$("#t2").children()</code> gives me the <code>&lt;b&gt;</code> and <code>&lt;p&gt;</code> tags.</p>
  
  <p><em>So <strong>how</strong> should I access it to get the values as an array containing "<code>Hi I am</code>", "<code>&lt;b&gt;....&lt;/b&gt;</code>", "<code>and am 20 years old.</code>", "<code>&lt;p&gt;.....&lt;/p&gt;</code></em> <strong>??</strong></p>