views:

63

answers:

1

Hi,

Normally, i'm using Modernizr for regular feature detection but it can't detect browser selector support (i.e: :nth-of-type() selector).

Is there a way to detect selector support of browser with jQuery?

A: 

You could try selecting something with that selector, if it returns 'NULL' either the browser does not support it, or there were no elements of that type

my suggestion is to use the selectors on something you know exists.

Hailwood
But jQuery's selector engine different than regular browser selector engine. How it could be? Can you give an example?
fatihturan
Different? How so?
Hailwood
If i right, jQuery is using Sizzle selector engine for selecting elements. If i try to select something like this: $('ul#f00 li:nth-of-type(odd)') it will return object on every browser (even IE6). Am i right?
fatihturan