ilto:[EMAIL PROTECTED] On Behalf Of RobG
> Sent: Tuesday, February 05, 2008 5:06 AM
> To: jQuery (English)
> Subject: [jQuery] Re: Zebra striping in tables
>
>
>
>
>
> On Feb 5, 7:57�pm, Snef <[EMAIL PROTECTED]> wrote:
> > Karl,
> >
> > Again, many than
ginal Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of RobG
Sent: Tuesday, February 05, 2008 5:06 AM
To: jQuery (English)
Subject: [jQuery] Re: Zebra striping in tables
On Feb 5, 7:57 pm, Snef <[EMAIL PROTECTED]> wrote:
Karl,
Again, many thanks. On
nd it will
not be part of your structure.
Allex
-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of RobG
Sent: Tuesday, February 05, 2008 5:06 AM
To: jQuery (English)
Subject: [jQuery] Re: Zebra striping in tables
On Feb 5, 7:57 pm, Snef &l
On Feb 5, 7:57 pm, Snef <[EMAIL PROTECTED]> wrote:
> Karl,
>
> Again, many thanks. Only just one question...
>
> I have used your one-liner like this:
>
> $("table tr:nth-child(even)").css("background", "#cc");
>
> I played around with the :not(:first) to eliminate the first row of
> each ta
Karl,
Thank you! This is what I was looking for!
Karl Swedberg schreef:
> One way to solve your dilemma is to use tr:nth-child(even). That will
> select all table rows that are an "even" child of their parent
> element. This should work:
>
> $("table tr:nth-child(even)").css("background", "#
Karl,
Again, many thanks. Only just one question...
I have used your one-liner like this:
$("table tr:nth-child(even)").css("background", "#cc");
I played around with the :not(:first) to eliminate the first row of
each table but i do not get it working. Is this possible to use this,
or is
Allex,
This is what I was thinking of but couldn't get my hands on the
'find'.
Your solutions works, but I think I go for Karls solution (a one-
liner).
Thank you!
Smith, Allex schreef:
> Couldn't you just use $(this) and then do whatever selector?
>
> $("table").each(function() {
> $(thi
One way to solve your dilemma is to use tr:nth-child(even). That will
select all table rows that are an "even" child of their parent
element. This should work:
$("table tr:nth-child(even)").css("background", "#cc");
--Karl
_
Karl Swedberg
www.englishrules.com
www.learn
Couldn't you just use $(this) and then do whatever selector?
$("table").each(function() {
$(this).find('tr:even').css("background-color", "#ff");
});
Maybe I don't understand the question.
Allex
-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] O
9 matches
Mail list logo