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 ?
CSS3 selectors element is supported by Microsoft Edge browser.
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.
It should work fine in all browsers JQuery actually supports.
It should work in all browsers - indeed, that is the main strength of jQuery :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With