您的位置:首页 > 其它

jqurey 2

2015-08-19 09:25 155 查看
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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息