jQuery: The Write Less, Do More JavaScript Library

Unknown pseudo-class or pseudo-element 'odd'.

View: New views
9 Messages — Rating Filter:   Alert me  

Unknown pseudo-class or pseudo-element 'odd'.

by shapper :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hello,

I am using JQuery 1.3.2 and the following code line:
$("table.Engine tbody tr:odd").addClass("Alternate");

I get the following error on firebug:
Unknown pseudo-class or pseudo-element 'odd'.

What am I doing wrong?

Thanks,
Miguel

Re: Unknown pseudo-class or pseudo-element 'odd'.

by Karl Swedberg-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Not sure why you're having this problem, but take a look at the very simple test case here: http://test.learningjquery.com/alt-rows.html

It seems to work fine. Maybe something else is going on in your code or markup? Hard to tell from that snippet.

--Karl

____________
Karl Swedberg




On Sep 13, 2009, at 2:19 PM, shapper wrote:


Hello,

I am using JQuery 1.3.2 and the following code line:
$("table.Engine tbody tr:odd").addClass("Alternate");

I get the following error on firebug:
Unknown pseudo-class or pseudo-element 'odd'.

What am I doing wrong?

Thanks,
Miguel


Re: Unknown pseudo-class or pseudo-element 'odd'.

by Lee-107 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Karl & Miguel,

Using Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:
1.9.1.5) Gecko/20091102 Firefox/3.5.5,

Viewing the test, I get this error:

Warning: Unknown pseudo-class or pseudo-element 'odd'.
Source File: http://test.learningjquery.com/alt-rows.html
Line: 0

Not sure why this would be happening although I am having similar
problems with :first etc...

Can anyone on a different platform confirm this behavior?

Regards, Lee.

Re: Re: Unknown pseudo-class or pseudo-element 'odd'.

by Karl Swedberg-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

that's strange, Lee. I just tried with FF 3.5.5 Mac (Mozilla/5.0  
(Macintosh; U; PPC Mac OS X 10.5; en-US; rv:1.9.1.5) Gecko/20091102  
Firefox/3.5.5 ) and had no such errors

--Karl

On Nov 7, 2009, at 2:08 AM, Lee wrote:

> Hi Karl & Miguel,
>
> Using Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:
> 1.9.1.5) Gecko/20091102 Firefox/3.5.5,
>
> Viewing the test, I get this error:
>
> Warning: Unknown pseudo-class or pseudo-element 'odd'.
> Source File: http://test.learningjquery.com/alt-rows.html
> Line: 0
>
> Not sure why this would be happening although I am having similar
> problems with :first etc...
>
> Can anyone on a different platform confirm this behavior?
>
> Regards, Lee.


Re: Unknown pseudo-class or pseudo-element 'odd'.

by pierre-86 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm seing the same behaviour on FF3.5.5 Windows with the example page
above or with my test page (I'm using :visible selector). I also use
jquery 1.3.2.
I actually get it on the document page on jquery.com:

Warning: Unknown pseudo-class or pseudo-element 'visible'.
Source File: http://docs.jquery.com/Selectors/visible
Line: 0

Re: Unknown pseudo-class or pseudo-element 'odd'.

by Steve Fleischer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I found this thread searching for a solution to this same error. I am
using FF 3.5.5 Win and jQuery 1.3.2 and get:

Warning: Unknown pseudo-class or pseudo-element 'even'.

when using this:

$("#listTable tr:even").addClass("altRow");

cheers
Steve

Re: Re: Unknown pseudo-class or pseudo-element 'odd'.

by Karl Swedberg-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Aha! I see it now. It's a warning, not an error, and it's a CSS warning. If you're seeing it in Firebug, you can hide it by unchecking "Show CSS Errors" in the Console preferences list.

--Karl

____________
Karl Swedberg




On Dec 1, 2009, at 4:11 AM, Steve Fleischer wrote:

I found this thread searching for a solution to this same error. I am
using FF 3.5.5 Win and jQuery 1.3.2 and get:

Warning: Unknown pseudo-class or pseudo-element 'even'.

when using this:

$("#listTable tr:even").addClass("altRow");

cheers
Steve


Re: Unknown pseudo-class or pseudo-element 'odd'.

by shapper :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Dec 1, 11:33 pm, Karl Swedberg <k...@...> wrote:
> Aha! I see it now. It's a warning, not an error, and it's a CSS  
> warning. If you're seeing it in Firebug, you can hide it by unchecking  
> "Show CSS Errors" in the Console preferences list.

Thank You,
Miguel

Re: Unknown pseudo-class or pseudo-element 'odd'.

by Steve Fleischer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I just asked about this on Twitter and got this reply from Andrew
Tetlaw:

http://twitter.com/atetlaw/status/6259397321

suggesting using tr:nth-child(even) rather than tr:even and this does
indeed work.

--
cheers
Steve


On Dec 2, 7:33 am, Karl Swedberg <k...@...> wrote:

> Aha! I see it now. It's a warning, not an error, and it's a CSS  
> warning. If you're seeing it in Firebug, you can hide it by unchecking  
> "Show CSS Errors" in the Console preferences list.
>
> --Karl
>
> ____________
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Dec 1, 2009, at 4:11 AM, Steve Fleischer wrote:
>
> > I found this thread searching for a solution to this same error. I am
> > using FF 3.5.5 Win and jQuery 1.3.2 and get:
>
> > Warning: Unknown pseudo-class or pseudo-element 'even'.
>
> > when using this:
>
> > $("#listTable tr:even").addClass("altRow");
>
> > cheers
> > Steve