Massimiliano Marini schrieb:

I need some help, I want to apply a class with 'addClass' at all <li> of
the first <ul class="menu"> and not to the second

How can I achieve this? Is possible without using the each() function?
Any help, suggestions, examples are welcome.

$("#foo > .menu").addClass("bar");

you have not closed second UL

*valid!!! Example:*
<div id="foo">
<ul class="menu"><!-- first -->
  <li>1</li>
  <li>2</li>
  <li class="expanded">
    <ul class="menu"><!-- second -->
      <li>3</li>
      <li>4</li>
    </ul>
  </li>
</ul>
</div>

--
Viele Grüße, Olaf

-----------------------------------
[EMAIL PROTECTED]
http://olaf-bosch.de/
http://ohorn.info/
http://www.akitafreund.de/
-----------------------------------

Reply via email to