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 |
Tell me an example usage of jquery mobile? : jquery mobile
What is the difference between jquery.size() and jquery.length?
How to read, write and delete cookies in jquery?
Is it too early to discuss jquery ui 1.8?
Is it possible to use our own specific character in the place of $ sign in jquery? : jquery mobile
How can events be prevented to work after an ajax request?
Differentiate between calling stop (true, true) and finish method?
What is a cdn? What are the advantages of using cdn?
How to use connect in jquery?
Define cache paremeter of jquery ajax method?
How to create, read and delete cookies with jquery?
How to get the current offset of the first matched element, in pixels, relative to the document using ?