title: HTMLInputElement has no method 'val'
body: <p>I'm looping through cells in a table row. each cell has a text box in it, and I want to take the value of the text box and push it onto an array.</p>
  
  <pre><code>function dothing() {
          var tds = $('#'+selected+' td');
          var submitvals = new Array();
          tds.each(function(i) {
              var val = $(this).children('input')[0].val();
              submitvals.push(val);
          });
      }
  </code></pre>
  
  <p>Theres more to the function, but this is all that is relevant. For some reason, when I run this code, I get "HTMLInputElement has no method 'val'." I thought that input elements were supposed to have a <code>val()</code> method in jQuery that got the value so this makes no sense. Am I missing something, or doing it wrong?</p>