Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of .size() method in jquery?

815


What is the between $(this) and 'this' in jquery?

873


How to read, write and delete cookies in jquery?

817


What does the jQuery migrate function do?

894


How you will use jquery means requirement needed for using jquery.

817


What is $() in jquery?

903


What is a filter in jquery? Explain

882


Tell me can we have multiple document.ready() function on the same page? : jquery mobile

854


Define cache paremeter of jquery ajax method?

818


Explain how jquery works?

885


Explain the basic need to start with jquery? : jquery mobile

829


Define .siblings() method in jquery?

862


Explain the concepts of "$ function" in jquery with an example?

913


What is the use of jquery.data()?

892


How to debug jquery code/ debug jquery?

943