JqueryNo Comments

default thumbnail

We can set multiple css properties to a element in jquery. Multiple css properties is very important not to write jquery again and again for a new css property

Jquery

$(document).ready(function(){
  $(".btn").click(function(){
    $("div").css({"background-color": "red", "font-size": "50", "border": "1px #F00 solid"});
  });
});

Be the first to post a comment.

Add a comment