Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In jQuery does the advanced CSS3 selection style work in all browsers?

I'm watching a tutorial learning JQuery for the first time, and it seems you can select items using pretty much CSS, like:

$('ul li:nth-child(3)').addClass('biscuits');

Is that kind of selector going to work on all browsers, or just ones that support CSS 3 ?

like image 456
NibblyPig Avatar asked May 25 '10 10:05

NibblyPig


People also ask

Is selector CSS browser support?

CSS3 selectors element is supported by Microsoft Edge browser.

Can you use CSS selectors in JQuery for selecting elements?

Projects In JavaScript & JQueryjQuery uses CSS selector to select elements using CSS. Let us see an example to return a style property on the first matched element. The css( name ) method returns a style property on the first matched element. name − The name of the property to access.


2 Answers

It should work fine in all browsers JQuery actually supports.

like image 145
Sarfraz Avatar answered Sep 23 '22 02:09

Sarfraz


It should work in all browsers - indeed, that is the main strength of jQuery :)

like image 35
Geoff Adams Avatar answered Sep 22 '22 02:09

Geoff Adams