Aaron, Not sure if you caught it, but I screwed up some quotes in my code snippet (stupid iphone). It should be:
$('ul.foo li ul').addClass("bar"); On Mar 1, 9:25 am, Aaron Johnson <aaron.mw.john...@gmail.com> wrote: > Greg, Nathan, Thanks very much for your help! > > On 1 March 2010 14:58, Nathan Klatt <n8kl...@gmail.com> wrote: > > > On Mon, Mar 1, 2010 at 5:06 AM, Aaron Johnson > > <aaron.mw.john...@gmail.com> wrote: > > > The top level list has an ID and associated css, I'd like to add a class > > to > > > each of the nested <ul> elements in order to style them differently. I > > > cannot manually add a class so wondered if I could do it with jQuery. > > > > I'm looking for a result like this: > > > > <ul class="foo"> > > > <li><a title="Announcements1" href="foo.html"><span > > > class="portal-navigation-label">Home</span></a> > > > <ul class="bar"> > > > If all of the inner uls are styled the same you don't need a class, > > just add a rule to your css: > > > ul.foo > li > ul { > > /* style stuff */ > > } > > > Nathan