jQuery 效果- 隐藏和显示
http://www.runoob.com/jquery/jquery-hide-show.html jQuery 效果- 隐藏和显示 隐藏、显示、切换,滑动,淡入淡出,以及动画,哇哦! <script> $(document).ready(function(){ $("p").click(function(){ $(this).hide(); }); }); </script> jQuery hide() 简单的jQuery hide()方法演示。 <script> $(document).ready(function(){ $(".ex .hide").click(function(){ $(this).parents(".ex").hide("slow"); }); }); </script> jQuery hide() 另一个hide()实例。演示如何隐藏文本。 jQuery hide() 和 show() 通过 jQuery,您可以使用 hide() 和 show() 方法来隐藏和显示 HTML 元素: 实例 $("#hide").click(function(){ $("p").hide(); }); $("#show").click(function(){ $("p").show(); }); 尝试一下 » 语法: $(selector).hide(speed