Thank you - that's exactlyt what I was looking for. The semantic approach seems a better approach as you described.
Thanks again. On Nov 9, 4:23 am, Paul Mills <[EMAIL PROTECTED]> wrote: > Hi, > I've found a slightly messy solution which is to grab the html for > each <li> element and then strip off the <ul> tags. It works but is > dependent on the exact sequence of code. > > I would make things easy for myself by adding some extra tags. Such as > putting <h2> tags around the Tilte text - then it's easy to grab it. > It's also more semantic as the Title text is a header. > > I've put my code in the jsbin page.http://jsbin.com/axeji/edit > > Paul > > On Nov 7, 7:03 pm, Logictrap <[EMAIL PROTECTED]> wrote: > > > How do I access just the titles (ie 'Title 1', 'Title 2')? Every > > method I tried also includes the content. > > > I tried using: not('[li]") & parent() > > > This is an example list structure. I want to be able to get just > > the titles: (ie Title 1, Title 2, Title 3) > > > <ul id="mylist"> > > <li> Title 1 > > <ul> > > <li>Content 1</li> > > </ul> > > </li> > > <li>Title 2 > > <ul> > > <li>Content 2</li> > > </ul> > > </li> > > <li>Title 3 > > <ul> > > <li>Content 3</li> > > </ul> > > </li> > > </ul>