If I have a table:

  <table>
     <tbody>
         <tr><td><span></span></td>/*many more cells here*/</tr>
         <tr><td><span></span></td>/*many more cells here*/</tr>
         // many more rows here...
      <tbody>
  </table>

And I'm handed a reference to a <span> inside one of the table cells,
what's the quickest method to obtain the row that contains the span?

Is this as fast as it gets?

   $(theSpan).parents('tr:first');

Does that even work?  Does ":first" work when climbing upwards through
the ancestry?

Thanks,
Andy

Reply via email to