title: text vs innerHTML in JQuery
body: <p>I get the same result from both methods, but not sure why. Research on SO tells me this:</p>
  
  <p>.text() returns JUST the text of that element and all of its descendant elements, where as .innerHTML returns all of the HTML in that element.</p>
  
  <p>however, further research tells me this:
  The real issue is that text() and innerHTML operate on completely different objects. </p>
  
  <p>Can I get some clarification?</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;table id="table2"&gt;
  &lt;th&gt; Col1 &lt;/th&gt;
  &lt;th&gt; Col2 &lt;/th&gt;
  &lt;tbody&gt;
  &lt;tr&gt;
  &lt;td id="data"&gt;456&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>JQuery</p>
  
  <pre><code>$('td').click(function() {
      var x=$(this).text();
      alert(x); //returns '456'
  })
  
  var abc = document.getElementById('data');
  var xyz = abc.innerHTML;
      alert(xyz); //also returns '456'
  </code></pre>