MorningZ is absolutely right, but if you notice that a certain class is used only by a single element, you should make it an id, which is equally usable by CSS and jQuery. For example, if those <li>s are part of navigation menu as they seem to be, I would have <li class="nav_sub" id="default"></li> <li class="nav_sub" id="company"></li> <li class="nav_sub" id="products"></li>
On Tue, Jan 13, 2009 at 8:31 PM, MorningZ <morni...@gmail.com> wrote: > > If you have control on the HTML, it would be a LOT easier/cleaner/make- > more-sense if you separate classes > > for instance > > <li class="nav_sub_default"></li> > <li class="nav_sub_company"></li> > <li class="nav_sub_products"></li> > .... > > to > > <li class="nav_sub default"></li> > <li class="nav_sub company"></li> > <li class="nav_sub products"></li> > .... > > That would make your jQuery life much easier, plus it makes the items > actually have "common" class characteristics > > Now when you want to manipulate them all: > > $("li.nav_sub").doSomejQueryAction > > and yet they all still have their unique styles/characteristics > > > >