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 features of jQuery, has been used in web applications?

771


Whether jQuery HTML work for both HTML and XML documents?

780


How We Can Write Code Specific To Browser In Jquery?

761


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

790


How to get the direct parent of an element using ?

856


How to use migrate jquery plugin if possible? : jquery mobile

767


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

711


How to check data type of any variable in jquery? : jquery mobile

722


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

731


How we can set the html contents of an element in jquery?

777


Explain the difference between .empty() and .remove() ?

712


How do I pull a native DOM element from a jQuery object?

801


How to work with jQuery parent(), children() and siblings()?

839


what is the use of param() method in jquery .

667


Difference between document.ready() and body onload()?

763