To get (return)or set style properties or values for selected components, utilize the jQuery CSS() function. It makes it easier for you to acquire one or more style properties.
There are two ways to use the jQuery CSS() method:
It's used to get the value of a CSS property that's been specified.
Syntax:\scss("propertyname");
Let's look at an example to show how this property works.
The background-color of this paragraph is red.
The background-color of this paragraph is green.
The background-color of this paragraph is blue.
This attribute is used to give all matched elements the same value.
css("propertyname","value");
The background-color of this paragraph is red.
The background-color of this paragraph is green.
The background-color of this paragraph is blue.
This paragraph has no background-color.
|