jQuery & CSS - Remove/Add display:none

前端 未结 13 2377
遥遥无期
遥遥无期 2020-12-12 12:37

I have a div with this class :

.news{
  width:710px; 
  float:left;
  border-bottom:1px #000000 solid;
  font-weight:bold;
  display:none;
}
<
13条回答
  •  庸人自扰
    2020-12-12 12:58

    jQuery provides you with:

    $(".news").hide();
    $(".news").show();
    

    You can then easily show and hide the element(s).

提交回复
热议问题