mercredi 28 décembre 2016

Want to change 2 or more attributes of a css in a single line of jquery code,How could I do that?

Can I use some jquery where I can change the css attributes in a single line , more like

 $("#box").css("height":"40px",
                "width":"40px"
               );

instead of 2 lines of code like this?

$("#box").css("height","40px");
$("#box").css("width","40px");




Aucun commentaire:

Enregistrer un commentaire