8. Changing Your Style - Is there a way to target multiple properties with the .css() function?


I just want to know if there's a way to select and modify multiples CSS properties using the function .css()

Replace this line with your code.


you can simply select different elements:


you can use even use class and id selectors


Sorry I got it wrong, I meant to say properties.

What I mean is if there's a way to do this: $("div").css("background-color", "black", "border-radius", "10px", "height", "200px", etc etc)


sure, but then the property values should be supplied as object:

      "background-color": "yellow",
      "font-weight": "bolder"


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.