I should have mentioned this site is still on 1.2.6, so I can't use closest.
However, replacing closest w/ parents does work for me. Thanks! On Jul 13, 1:54 pm, James <james.gp....@gmail.com> wrote: > Try closest():http://docs.jquery.com/Traversing/closest > > <table> > <tr><td class="someclass">text 1</td></tr> > <tr><td class="someclass">text 2</td></tr> > <tr><td class="someclass">text 3</td></tr> > </table> > > $("td.someclass").click(function() { > var parentTable = $(this).closest("table"); > // and you can get the cells in several ways, here's one > var cells = parentTable.find("td.someclass"); > > }); > > On Jul 13, 9:39 am, Brad <nrmlcrpt...@gmail.com> wrote: > > > I can do this to select all td's with a class of someclass > > > var cells = $("td.someclass"); > > > My page my have more than one table so this would select all matching > > td's. What I need to do is isolate the selection to only the cells in > > the table where a row was clicked. > > > I've tried > > > var cells = $("td.someclass").filter(this.parents("table")); > > > but that is throwing an error w/in jQuery.