views:

44

answers:

2

There are several CSS selectors that are not supported by IE6 example:

> (Child selector)
+ (Selects an element that is a next sibling of another element.)
[attr] selector
:first-child

Does this impact the functioning of jQuery? i.e. if you use eg :

$("div > a").css("","");

Will it cause problems in IE6 or will it work without issues. Basically my question is, in its core does jQuery rely on the browser or does it use its own logic to select DOM elements.

I know everyone hates IE6 and you probably feel it should not be supported, but, I am trying to understand how jQuery actually works under the hood.

Thanks!

+6  A: 

jQuery selectors are implemented with the Sizzle Selector engine, which is compatible with:

Fire­fox 2.0+, Inter­net Explorer 6+, Safari 3+, Opera 9+, Chrome 1+

http://www.kevinleary.net/enhancing-css-with-javascript-using-sizzle/

pharalia
+3  A: 

jQuery uses it's own selector engine and, whilst sometimes it does map to the browser's selector engine if it's accessible, any selectors not implemented by the browser will result in jQuery applying it's own magic. So yes, it will work.

Andy E