title: How do I reference a table row using jQuery
body: <p>Afternoon,</p>
  
  <p>I wish to pass the row number of a table to a function to reference that specific row in that specific table, for example say I have this:</p>
  
  <pre><code>&lt;table id="foo"&gt;
    &lt;tr&gt;&lt;td&gt;some stuff...&lt;/td&gt;&lt;tr&gt;
    &lt;tr&gt;&lt;td&gt;stuff&lt;/td&gt;&lt;tr&gt;
    &lt;tr&gt;&lt;td&gt;more stuff&lt;/td&gt;&lt;tr&gt;
    &lt;tr&gt;&lt;td&gt;some stuff&lt;/td&gt;&lt;tr&gt;
    &lt;tr&gt;&lt;td&gt;some stuff&lt;/td&gt;&lt;tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>and I have looped through the table rows and obtained the index, so in this example say I wanted to do something with the third row (which would have an index of 2, the one which has the contents "more stuff"). And I passed this through a function, like this</p>
  
  <pre><code>manipulateRow(2)
  </code></pre>
  
  <p>and this is my whole function</p>
  
  <pre><code>function manipulateRow(rowIndex){
  
  /* do something */
  
  }
  </code></pre>
  
  <p>How do you refer the rowIndex parameter to the table within the function? For example:</p>
  
  <pre><code>$('#foo').child("tr")[rowIndex].html('&lt;td&gt;i now contain even more stuff!&lt;/td&gt;'); // I know this is wrong, how do I make it right?
  </code></pre>
  
  <p>Sorry if I'm being a bit thick or not explaining myself.</p>