CSS Selector in jQuery
The jQuery library supports almost all Selector in Cascading Style Sheet (CSS), when mentioned on the World Wide Web Consortium.
Using the jQuery library, programmers can upgrade their Websites without worrying about their browsers and versions, as long as these browsers have JavaScript enabled.
Most jQuery CSS methods do not modify the content of jQuery objects and they are used to apply CSS properties on DOM elements.
Apply CSS properties in jQuery
It's really simple to apply CSS properties using jQuery's css (PropertyName, PropertyValue) method .
Here is the syntax for this method:
selector .css( PropertyName, PropertyValue );
Here, you can pass PropertyName as a JavaScript string and based on its value, PropertyValue can be a string or an integer.
For example
The following example adds the Font color to the third item list :
The jQuery Example
list item 1 list item 2 list item 3 list item 4 list item 5 list item 6
It will produce the following result:
- list item 1
- list item 2
- list item 3
- list item 4
- list item 5
- list item 6
Apply many CSS properties in jQuery
You should read it
Maybe you are interested
The mysterious bubble that appears in the center of the Milky Way galaxy is finally 'decoded'.Help, I'm addicted to 3D printing Astronauts could use their own pee to build future moon habitatsAMD CPUs also have security vulnerabilities that have existed for many years now! Top 5 best water toothpick machines todayWhat is the best, cheapest water toothpick?