第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

為什么這個例子不需要dequeue就能執(zhí)行queue的隊列的函數(shù)

為什么這個例子不需要dequeue就能執(zhí)行queue的隊列的函數(shù)

紅糖糍粑 2018-12-04 17:18:39
<!DOCTYPE html><html><head>    <meta charset="utf-8">     <title>Bootstrap 實例 - 按鈕(Button)插件加載狀態(tài)</title>    <link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">    <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>    <script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script></head><body><button id="fat-btn" class="btn btn-primary" data-loading-text="Loading..."        type="button"> 加載狀態(tài)</button><script>    $(function() {        $(".btn").click(function(){            $(this).button('loading').delay(1000).queue(function() {            $(this).button('reset');            //alert('123');            // $(this).dequeue();             });        });    });  </script>注釋掉dequeue依然會執(zhí)行reset。
查看完整描述

1 回答

?
慕斯709654

TA貢獻1840條經(jīng)驗 獲得超5個贊

dequeue() 方法從隊列中移除下一個函數(shù),然后執(zhí)行函數(shù)。
queue第一個會自動執(zhí)行,如果你不掉用dequeue方法,那么剩余的任務(wù)就不執(zhí)行了。
怎么說呢,反正就是第一個任務(wù)會自動執(zhí)行,要執(zhí)行后續(xù)動畫需要調(diào)用dequeue。暫時先這樣理解吧。
你可以在后續(xù)添加:this.animate({width:300},"slow");之類的動畫,你就會發(fā)現(xiàn),不調(diào)用dequeue是無法執(zhí)行后續(xù)動畫了

查看完整回答
反對 回復(fù) 2019-01-04
  • 1 回答
  • 0 關(guān)注
  • 481 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號