亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

jquery隊列函數(shù)用法實例

 更新時間:2014年12月16日 14:45:23   投稿:shichen2014  
這篇文章主要介紹了jquery隊列函數(shù)用法,以實例形式分析了jQuery中隊列的用法以及控制樣式的技巧,具有一定的參考借鑒價值,需要的朋友可以參考下

本文實例講述了jquery隊列函數(shù)用法。分享給大家供大家參考。具體實現(xiàn)方法如下:

復(fù)制代碼 代碼如下:
<!DOCTYPE>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="jquery-1.9.1.js"></script>
</head>
<body>
<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>
<script>
$(document.body).click(function () {
      $("div").show("slow");
      //$("div").slideDown();
      $("div").animate({left:'+=200'},2000);
      $("div").queue(function () {//入隊列
          $(this).addClass("newcolor");
          $(this).dequeue();//出隊列
      });
      $("div").animate({left:'-=200'},2000);
      $("div").queue(function () {//入隊列
          $(this).removeClass("newcolor");
          $(this).dequeue();//出隊列
      });
      $("div").slideUp();
});
</script>
</body>
</html>

希望本文所述對大家jQuery程序設(shè)計的學(xué)習(xí)有所幫助。

相關(guān)文章

最新評論