zoukankan      html  css  js  c++  java
  • jquery-常用的运行函数

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>jquery--运动函数</title>
      <style>
      .print1{ 500px; height: 300px; background: yellow;}
       .print2{ 800px; height: 300px; background: red;}
      </style>
      <script src='../jquery-3.1.1.min.js'></script>
      <script>
      $(function(){
     /*     $('.print1').click(function(){
           // $(this).animate({300,height:300});
            // $(this).animate({300,height:300},800);
    
             $(this).animate({300},800,'linear',function(){$(this).animate({height:100},800,'linear')})});*/
              // $('li').on('click',function(){this.style.background='red';});
         // .delegate() 事件委托方法
      /*      $('ul').delegate('li','click',function(){$(this).css('background','red');});*/
           $('.print1').on('click',{name:'nihao'},function(ev){
               console.log(ev.data.name);
           })
      });
      </script>
        </head>
    <body>
        <div class="print1">
    
    
    
       </div>
         <div class="print2">
               $(this).animate({300,height:300});第一个参数运动属性和值;<br/>
            $(this).animate({300,height:300},800);第二个参数运动的时间<br/>
            $(this).animate({300,height:300},800,'linear');第三个参数linear慢快慢;linear均速<br/>
                $(this).animate({300},800,'linear',function(){$(this).animate({height:100},800,'linear')})添加函数,链式运动<br/>
                stop();阻止当前运动 stop(true); 阻止后续运动stop(true,true,true);立即停止到指定目标点<br/>
                .delay(); 延迟方法;<br/>
                .delegate() 事件委托方法   trigger()主动触发函数<br/>
                ev.data; 获取事件数组;  ev.target当前操作的事件类型; ev.type操作属性<br/>
    
         </div>
       <ul>
       <li>11</li>
       <li>22</li>
       <li>33</li>
       <li>44</li>
       </ul>
    </body>
    </html>
  • 相关阅读:
    java基础---多线程---volatile详解
    java基础---多线程---线程的几种状态及其转换,wait,notify,sleep,yield,join
    java基础---设计一个死锁
    count(1) and count(*),count(字段)区别及效率比较
    mysql之字段约束-第五篇
    mysql之数据表基本操作-第四篇
    mysql之数据类型-第三篇
    mysql之存储引擎-第二篇
    mysql之数据库操作-第一篇
    Redis详解
  • 原文地址:https://www.cnblogs.com/hack-ing/p/6166035.html
Copyright © 2011-2022 走看看