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 are the effects methods used in jquery?

784


What is a jquery ajax?

712


Why are not some scripts and styles loading? : jquery mobile

737


Explain cdn in jquery?

4505


With jquery ui 1.7 being released in the last few days, what do you see as the key parts of jquery ui 1.7? What are you most proud of out of that release?

858


Jquery can be used in what scenarios?

745


How do you check or uncheck a checkbox input or radio button?

864


What is queue() in jquery? Use of queue() in jquery?

738


Explain remove class jquery with example?

742


Define cache paremeter of jquery ajax method?

721


How to always reference latest version of jquery?

774


Explain chaining in jquery? : jquery mobile

767


Can you please explain the difference between body onload() and document.ready() function? : jquery mobile

719


How to set attributes of an element using jquery?

766


How to redirect to another page using jquery?

748