zoukankan      html  css  js  c++  java
  • Jquery一个slideToggle搞定div的隐藏与显示

    Jquery一个slideToggle搞定div的隐藏与显示

    <!DOCTYPE html>
    <html>
    <head>
    <script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js">
    </script>
    <script> 
    $(document).ready(function(){
    $("#flip").click(function(){
    $("#panel").slideToggle("slow");
    });
    });
    </script>
    
    <style type="text/css"> 
    #panel,#flip
    {
    padding:5px;
    text-align:center;
    background-color:#e5eecc;
    border:solid 1px #c3c3c3;
    }
    #panel
    {
    padding:50px;
    display:none;
    }
    </style>
    </head>
    <body>
    
    <div id="flip">Click to slide the panel down or up</div>
    <div id="panel">Hello world!</div>
    
    </body>
    </html>

     原文:http://www.runoob.com/jquery/jquery-ref-selectors.html

  • 相关阅读:
    UVa 106
    UVa 111
    UVa 105
    UVa 104
    UVa 103
    UVa 102
    UVa 101
    UVa 100
    就决定是你了!
    阿姆斯特朗回旋加速喷气式阿姆斯特朗炮
  • 原文地址:https://www.cnblogs.com/youmingkuang/p/5099755.html
Copyright © 2011-2022 走看看