男女疯狂一边摸一边做羞羞视频|啊好深好硬快点用力别停动态图|亚洲一区无码中文字幕|特级无码毛片免费视频播放▽|久久狠狠躁免费观看|国内精品久久久久久网站

首頁(yè)  >  核心  > queue(e,[q])

返回值:Array/jQueryqueue(element,[queueName])

jQuery queue() 方法概述

顯示或操作在匹配元素上執行的函數隊列

參數

element,[queueName]Element,StringV1.3

element:檢查附加列隊的DOM元素

queueName:字符串值,包含序列的名稱(chēng)。默認是 fx, 標準的效果序列。

element,queueName,newQueueElement,String,ArrayV1.3

element:檢查附加列隊的DOM元素

queueName:字符串值,包含序列的名稱(chēng)。默認是 fx, 標準的效果序列。

newQueue:替換當前函數列隊內容的數組

element,queueName,callback()Element,StringV1.3

element:檢查附加列隊的DOM元素

queueName:字符串值,包含序列的名稱(chēng)。默認是 fx, 標準的效果序列。

callback():要添加進(jìn)隊列的函數

示例

描述:

顯示隊列長(cháng)度

HTML 代碼:
<style>
  div { margin:3px; width:40px; height:40px;
        position:absolute; left:0px; top:30px; 
        background:green; display:none; }
  div.newcolor { background:blue; }
  span { color:red; }
</style>
<button id="show">Show Length of Queue</button>
<span></span>
<div></div>
jQuery 代碼:
$("#show").click(function () {
      var n = $("div").queue("fx");
      $("span").text("Queue length is: " + n.length);
});
function runIt() {
      $("div").show("slow");
      $("div").animate({left:'+=200'},2000);
      $("div").slideToggle(1000);
      $("div").slideToggle("fast");
      $("div").animate({left:'-=200'},1500);
      $("div").hide("slow");
      $("div").show(1200);
      $("div").slideUp("normal", runIt);
}
runIt();

描述:

通過(guò)設定隊列數組來(lái)刪除動(dòng)畫(huà)隊列

HTML 代碼:
<style>
  div { margin:3px; width:40px; height:40px;
        position:absolute; left:0px; top:30px; 
        background:green; display:none; }
  div.newcolor { background:blue; }
  </style>

  <button id="start">Start</button>
  <button id="stop">Stop</button>
  <div></div>
jQuery 代碼:
$("#start").click(function () {
      $("div").show("slow");
      $("div").animate({left:'+=200'},5000);
      $("div").queue(function () {
          $(this).addClass("newcolor");
          $(this).dequeue();
      });
      $("div").animate({left:'-=200'},1500);
      $("div").queue(function () {
          $(this).removeClass("newcolor");
          $(this).dequeue();
      });
      $("div").slideUp();
  });
  $("#stop").click(function () {
      $("div").queue("fx", []);
      $("div").stop();
  });

描述:

插入一個(gè)自定義函數 如果函數執行后要繼續隊列,則執行 jQuery(this).dequeue();

HTML 代碼:
<style>
  div { margin:3px; width:40px; height:40px;
        position:absolute; left:0px; top:30px; 
        background:green; display:none; }
  div.newcolor { background:blue; }
  </style>
  Click here...
  <div></div>
jQuery 代碼:
$(document.body).click(function () {
      $("div").show("slow");
      $("div").animate({left:'+=200'},2000);
      $("div").queue(function () {
          $(this).addClass("newcolor");
          $(this).dequeue();
      });
      $("div").animate({left:'-=200'},500);
      $("div").queue(function () {
          $(this).removeClass("newcolor");
          $(this).dequeue();
      });
      $("div").slideUp();
});
男女疯狂一边摸一边做羞羞视频|啊好深好硬快点用力别停动态图|亚洲一区无码中文字幕|特级无码毛片免费视频播放▽|久久狠狠躁免费观看|国内精品久久久久久网站