1.

How We Can Get The Value Of Multiple Css In Single Statement Of Jquery?

Answer»

Below is the SAMPLE code to explain:

VAR Mypropertiescollection = $("#MyControlID").css([ "height", "width", "backgroundColor" ]);

In the above code SNIPPET variable – “Mypropertiescollection” will have ARRAY like below –

{

height: "100PX",

width: "200px", 

backgroundColor: "#FF01EF"

}

Below is the sample code to explain:

var Mypropertiescollection = $("#MyControlID").css([ "height", "width", "backgroundColor" ]);

In the above code snippet variable – “Mypropertiescollection” will have array like below –

{

height: "100px",

width: "200px", 

backgroundColor: "#FF01EF"

}



Discussion

No Comment Found