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

Can you please explain the difference between .js and .min.js? : jquery mobile

750


How to concatenate two strings using jquery?

901


What are all the ways to include jQuery in a page?

809


Is jquery a library for client scripting or server scripting? : jquery mobile

757


How to use connect in jquery?

838


How we can apply css in multiple selectors in jquery?

951


Which sign is used as a shortcut for jQuery?

1001


Explain the difference between jquery-x.x.x.js and jquery.x.x.x min.js?

763


What is serialize() in jquery?

787


What is the difference between find and children methods?

876


What is the use of jQuery filter?

784


How can you select all elements in a page using jquery?

832


Explain event.preventdefault? : jquery mobile

841


What are the types of selectors that are used in jquery? Give examples.

849


What is a filter in jquery? Explain

848