Home > Back-end >  How to add ul element's style with jquery?
How to add ul element's style with jquery?

Time:11-11

I want to style an ul element created with js

<ul class="form">
...
<ul>

CodePudding user response:

$("ul.form").css({
  display: "none",
  color: "red", 
  width, height & other style elements 
  ...
});

CodePudding user response:

$("ul.form").css("background-color", "#000000");
$("ul.form").css({backgroundColor: "#000000"});
$("ul.form").attr("style", "background-color: #000000;");
  • Related