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 four parameters used for jQuery Ajax method?

844


Define .siblings() method in jquery?

808


Difference between document.ready and window.onload? : jQuery Mobile

878


How to include jQuery in ASP.Net project?

914


Explain the difference between find and children methods in jquery?

815


What is the use of clone method in jQuery?

863


How can jquery library be added to pages? Write a basic jquery code?

800


Explain which program is useful for testing jquery?

9068


What is the method used to define the specific character in place of $ sign?

969


Difference between detach and remove? : jQuery Mobile

796


How can we show and hide an element via jquery?

793


Define width() vs css('width')?

796


Explain the difference between $(this) and 'this' in jquery?

846


Whether we need to add jQuery file in both Master and Content page?

821


How do you select an item using css class or id and get the value by use of jquery.

800