Is it possible to get value of multiple CSS properties in single statement?
Answer / chaitanya
Well, before jQuery 1.9 release it was not possible but one of the new feature of jQuery 1.9 was .css() multi-property getter.
Hide Copy Code
var propCollection = $("#dvBox").css([ "width", "height", "backgroundColor" ]);
In this case, the propCollection will be an array and it will look something like this.
Hide Copy Code
{
width: "100px",
height: "200px",
backgroundColor: "#FF00FF"
}
Is This Answer Correct ? | 1 Yes | 0 No |
What are two different version of jquery library? : jquery mobile
Is vanilla js faster than jquery?
Explain cdn in jquery?
Why do we use jquery? : jquery mobile
Is jquery a w3c standard? : jquery mobile
What are the fastest selectors in jQuery?
What are the methods used to provide effects in jquery?
Please tell us that is jquery knockkout intended to compete with jquery or prototype or work with it?
Need to add jQuery file in both Master and Content page?
Explain the basic need to start with jquery? : jquery mobile
Does jquery follow w3c recommendations?
How to find grand children in of an element?