top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Is it possible to get value of multiple CSS properties in single statement?

+3 votes
389 views
Is it possible to get value of multiple CSS properties in single statement?
posted Jul 23, 2015 by Shivaranjini

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

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"
}

answer Jul 24, 2015 by Manikandan J
Similar Questions
0 votes

I want to add a menu to my application screens. The menu will have the menu icons which are horizontal scroll-able one menu at a time when left or right arrow pressed.

...