Surely it's easier as a CSS jobby, rather than JS? ul a { background-color:#f00; color:#fff; }
or ul a:hover { background-color:#f00; color:#fff; } On Apr 24, 9:26 am, Joseph Le Brech <jlebr...@hotmail.com> wrote: > why do you need to give it a class programmaticaly? > > try this: > > $("ul a").addClass("highlight"); > > http://docs.jquery.com/Selectors/descendant#ancestordescendant > > _________________________________________________________________ > Share your photos with Windows Live Photos – > Free.http://clk.atdmt.com/UKM/go/134665338/direct/01/