jqurey 隐藏

1.

$("#test").hide();     //jQuery 的 hide() 函数,隐藏 id="test" 的元素。


2.

$(".test").hide();      //jQuery 的 hide() 函数,隐藏所有 class="test" 的元素。


3.

 $("#div1").fadeOut();      //jQuery fadeout() 函数,淡出

$("#div2").fadeOut("slow");
$("#div3").fadeOut(1000);


4.  

$("p").click(function(){      //“<p>点击我,我会消失</p>”点击会消失

    $(this).hide();
  });


5.//一个css样式

<style type="text/css">
div.ex
{
background-color:#e5eecc;
padding:7px;
border:solid 1px #c3c3c3;
}
</style>




<div class="ex">
<p>联系人:张先生<br />
</div>