ravi
answered Apr 25 '22 00:00
elementobject.css("propertyname");
by css() method either you can set the value or get the value of the property
for suppose:
1. css() setter method
if you want to set the color to black to specific element can be done as like below code :
$("span").css("color","black")
so above code will set the color to black for all span tag to current html page.
2. css() getter method
if you want to get the color from a specific element can be done as like below code :
var spancolor=$(".spanclass").css("color")
so above code will get the color property value for given class element