slideUp() 函数

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
</head>
<body>
    <div id="divv">
        <h2 id="hhh">我是标题</h2>
        <p class="para">你好</p>
    </div>


    <script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#hhh").toggle(function () {
                $(this).next().slideUp();
            }, function () {
                $(this).next().slideDown();
            });
        })
    </script>
</body>
</html>

posted @ 2016-06-28 15:51  Chris_在IT道路上前行  阅读(175)  评论(0编辑  收藏  举报