> $("#foo > .menu > li:not(.expanded)").addClass("bar");
Great Olaf, that's was exactly what I've tried to write. Thanks :)
--
Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/
"It's easier to invent the future than to predict it." -- Alan Kay
$('.menu:first').addClass("bar");
On Aug 24, 3:24 pm, Massimiliano Marini <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I need some help, I want to apply a class with 'addClass' at all of
> the first and not to the second
>
> Example:
>
>
> 1
> 2
>
>
> 3
> 4
>
>
>
>
>
> $('.menu:first').addClass("bar");
Thanks to you and Olaf, the right way was:
$(".menu:first > li").addClass("bar");
I know it was so easy, but thanks 1k :)
--
Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/
"It's easier to invent the future than to predict it." -- Alan Kay
Massimiliano Marini schrieb:
I need some help, I want to apply a class with 'addClass' at all of
the first and not to the second
ah sorry after reading better ;)
$("#foo > .menu > li:not(.expanded)").addClass("bar");
or so
$("#foo > .menu > li").addClass("bar");
see what better for you,
Massimiliano Marini schrieb:
I need some help, I want to apply a class with 'addClass' at all of
the first 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 hav
5 matches
Mail list logo