title: jQuery .html() is returning as 'undefined'
body: <p>For some reason when I use <code>html()</code> it returns as undefined. Using <code>text()</code> doesn't work either.</p>
  
  <p>I've searched through the internet as well as stackoverflow, and all of the answers have not solved my problem. I'm a novice a jQuery, so please be easy on me :)</p>
  
  <p>Here's my code:</p>
  
  <p>jQuery:</p>
  
  <pre><code>$("#cartBtn").on("click", function() {
      var total = $("#cart_cost").html();
      $("#total").append(total);
  });
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;td id="cart_cost" class="text-right"&gt;$10&lt;/td&gt;
  
  &lt;a id="total"&gt;Total: &lt;/a&gt;
  </code></pre>