Thanks Klaus. I'm still learning. Maybe should show the light here. I have a 7 year old Windows HELP TOC generator that creates an UL list of about 500 links, its about 4 levels deep.
<ul> <li><a ..></a><li> <li><a ..></a><li> <li><a ..></a><li> <ul> <li><a ..></a><li> <li><a ..></a><li> </ul> <li><a ..></a><li> <ul> <li><a ..></a><li> <li><a ..></a><li> <ul> <li><a ..></a><li> <li><a ..></a><li> </ul> <li><a ..></a><li> <li><a ..></a><li> </ul> ... </ul> Whats missing about is the <OBJECT> tags for the windows help system. Now, I just modify our HELP generator with option to not add the <OBJECT> and just create the HTML. The idea is to create use jQuery to auto create a expandable/collapsable tree - a Tree View. I struggled with finding the selectors here to add the +/- graphics, etc. I could easily modify the code to create all the HTML to do this. But that is no fun its not jQuery. :-) So what would be the selectors here, for example to find the node that has a child. I tried various selectors and can't quite get it. For example, I think I want to find: - the first LI of UL - and any LI with a UL There is where I could had a click to expand/collapse. Yes, I now there are plugins but that isn't going to help me learn this. :-) I'll probably end up modifying the HELP generator to create all the proper DIVs, etc, the long way :-) -- HLS On Sep 4, 5:44 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote: > Pops wrote: > > You can so do multiple selects, like find all divs and h3 > > > $('div h3') > > > but if you use the comma: > > > $('div,h3') > > > that says find the H3 tag that is within div, I think <g> > > It's vice versa. Find all div and h3 *elements*: > > $('div, h3') // grouping > > Find all h3 elements that are descendants of divs: > > $('div h3') // => descendant selector > > Grouping selectors:http://www.w3.org/TR/CSS21/selector.html#grouping > > Descendant > selector:http://www.w3.org/TR/CSS21/selector.html#descendant-selectors > > Elements are not tags:http://www.w3.org/TR/html401/intro/sgmltut.html#h-3.2.1 > > "Elements are not tags. Some people refer to elements as tags (e.g., > "the P tag"). Remember that the element is one thing, and the tag (be it > start or end tag) is another. For instance, the HEAD element is always > present, even though both start and end HEAD tags may be missing in the > markup." > > --Klaus