Hi hi, ':has' and ':not' are your friends:
$('#containerDiv tr:not(:has(div.taskSummary))') On Apr 29, 1:26 pm, Shawn <[EMAIL PROTECTED]> wrote: > Eventually got this working: > > $("tbody > tr", "#crewSchedule").each( function (pos) { > if ($(".taskSummary", this).length == 0) { > $(this).toggle(); > $("#scheduleOutput .fixedTable table > tbody > tr:eq(" + pos + > ")").toggle(); > } > > }); > > (the second .toggle() also hides the label for the current row, which > resides in another table). > > This is still slowish though... Luckily the clients are on decent > computers. But guess I have no choice but to do it this way - seeing as > I need the position to match with the second table... > > Still, I'd appreciate any comments to improve this.... > > Shawn > > > > Shawn wrote: > > > I'm either making this more difficult than it is, or I'm missing > > something simple... > > > I have a div that contains a table. Inside that table I have rows with > > an arbitrary number of cells. The cells may or may not contain a div > > with a "tasksummary" class. I need to find all the rows that DO NOT > > have a task summary div, and toggle them. > > > I can easily find the tasksummaries: > > > $("#containerDiv > table > tbody> tr .tasksummary"); > > > But how do I change this to give me the TR's that don't have a task > > summary div? (note, some of the cells may contain sub tables, so the > > explicit table>tbody>tr isolates only the main table...) > > > The only method I can see right now is to find the TRs then do a .each() > > on them and check each row with the .hasClass(). But I'm sure there's > > an easier way... > > > Thanks for any input. > > > Shawn- Hide quoted text - > > - Show quoted text -