Q:

jquery styles

$('#element').css('display', 'block'); /* Single style */
$('#element').css({'display': 'block', 'background-color' : '#2ECC40'}); /* Multiple style */ 
24

$("p").css("background-color", "yellow");
 
9
$('#yourElement').css('display', 'none');
3
//create an object and add styles
const styles= {
  backgroundColor: "crimson",
  fontWeight: "bold",
  border: "2px solid lime",
};

$("selector").css(styles);
0

New to Communities?

Join the community