Karl Swedberg schrieb: > You might also be able to reduce this a bit, depending on your markup: > > $('a.selected').parents('div.linkSubMenu').show(); > > It seems a shame to traverse all the way down that set of nodes, only to > have to traverse back up.
What about some XPath magic: $("//div.linkSubMenu[ul/li/a.selected]") At least its in the documentation, but I've not used it so far. http://docs.jquery.com/DOM/Traversing/Selectors#XPath_Selectors Look for "Nodelist". -- Klaus _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/