jq 点击显示 隐藏

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
    </head>
<style>
        .Albuum{border:1px solid red;width:1200px;height:350px ;margin: auto;}
</style>
    <body>
            <div class="Albuum">
               <div class="pop-close" style="position:relative;">
                  <a href="javascript:void(0);" style="right: -38px;position: absolute;line-height: 34px;width: 35px;height: 35px;border-radius: 8px;text-align:center;color:#fff;background:red;border:1px solid red;">关闭</a>  
                </div>
            </div>
             <a href="javascript:void(0);" class="zhibo" style="display:none;" ><span  style="width:150px;">点我点我</span></a>
    </body>
</html>
<script src="js/jquery-1.7.1.min.js" type="text/javascript" ></script>

<script>

 $(document).ready(function() {
     $('.pop-close').click(function () {
            $('.Albuum').hide();
            $('.zhibo').show();
        });
        $('.zhibo').click(function () {
            $('.Albuum').show();
            $('.zhibo').hide();
        });
 });

</script>

猜你喜欢

转载自blog.csdn.net/qq_36591333/article/details/79941927