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 |
Define jquery $.ajax() method?
What is the use of param() method?
Explain type paremeter of jquery ajax method?
Explain animate function in jquery?
What's next on the hitlist with jquery ui?
What is the use of jQuery.data() method?
Where jQuery code is getting executed?
What are the types of selectors that are used in jquery? Give examples.
How to find all sibling elements after the current element using ?
How you will use jquery means requirement needed for using jquery.
List a few features of jquery mobile? : jQuery Mobile
Explain each() function in jquery?