zoukankan      html  css  js  c++  java
  • hover()方法

    node2:/var/www/html/jquery#cat t40.html
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <style>
            #panel{
                 400px;height: 100%;border: 1px solid #ddd;margin: 0;padding: 0px;margin-left: 200px;margin-top: 20px;
            }
            .head{
                background: #aaa;padding: 10px;margin: 0;color: #000;
            }
            .content{
                padding: 10px;text-align: left;text-indent: 2em;display: none;
            }
        </style>
        
    </head>
    <body>
        <div id="panel">
            <h5 class="head">什么是jQuery?</h5>
            <div class="content">
                我是小文本,小文本,小文本,小文本,小文本,小文本,小文本,小文本,小文本,小文本,小文本,小文本,小文本,小文本,小文本,小文本,小文本,小文本,小文本,小文本,小文本,小文本小文本,小文本,小文本,小文本,小文本,小文本,小文本,小文本,小文本,小文本,小文本,小文本,小文本,小文本,小文本
            </div>
        </div>
    <script type="text/javascript" src="jquery-1.2.3.min.js"></script>    
    <script type="text/javascript" src="t40.js"></script>
    node2:/var/www/html/jquery#
    node2:/var/www/html/jquery#cat t40.js
    
    $(function(){
      $("#panel h5.head").hover(function(){
         $(this).next("div.content").show();
    },function(){
         $(this).next("div.content").hide();
    });
    });
  • 相关阅读:
    每日一练之动态算法
    001之IP基础对话框
    mysql的一些操作
    logcat 提示 Unable to open log device '/dev/log/main': No such file or directory
    之前接触过的测试的相关工具
    SAP内存、ABAP内存
    模块化程序—函数 function
    模块化程序-子例程
    模块化程序-宏
    传输请求的管理
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13348775.html
Copyright © 2011-2022 走看看