欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

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

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

本文實(shí)例講述了jquery隊(duì)列函數(shù)用法。分享給大家供大家參考。具體實(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 () {//入隊(duì)列
          $(this).addClass("newcolor");
          $(this).dequeue();//出隊(duì)列
      });
      $("div").animate({left:'-=200'},2000);
      $("div").queue(function () {//入隊(duì)列
          $(this).removeClass("newcolor");
          $(this).dequeue();//出隊(duì)列
      });
      $("div").slideUp();
});
</script>
</body>
</html>

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

相關(guān)文章

最新評(píng)論