clear
UK[kl??(r)] US[kl?r]
adj. クリア; クリア; クリア、クリア; クリア、明るい
adv.完全に; 明確に; 全體
vi. 明確になる; 明確になる
vt. スイープ、削除; (容疑者) を排除する; 明確にする; きれいにする
n. 隙間、スペース
queue
英[kju:]美[kju]
n.(人や車両)行列、行列。 braid
vi. (人、車両など) 並んで待つ
vt. (作る) 並んで、並んで待つ
jquery clearQueue方法 構(gòu)文
関數(shù): clearQueue() メソッドは、キュー內(nèi)のまだ実行されていないすべての関數(shù)を停止します。 stop() メソッド (アニメーションに対してのみ機(jī)能します) とは異なり、clearQueue() はキューに入れられた関數(shù) (.queue() メソッドを介して汎用の jQuery キューに追加された関數(shù)) をクリアします。
構(gòu)文: $(selector).clearQueue(queueName)
パラメータ:
パラメータ | 説明 |
キュー名 | オプション。停止するキューの名前を指定します。デフォルトは「fx」、標(biāo)準(zhǔn)のエフェクトキューです。 |
jquery clearQueue方法 例
<html> <head> <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#start").click(function(){ $("#box").animate({height:300},"slow"); $("#box").animate({width:300},"slow"); $("#box").queue(function () { $(this).css("background-color","red"); $(this).dequeue(); }); $("#box").animate({height:100},"slow"); $("#box").animate({width:100},"slow"); }); $("#stop").click(function(){ $("#box").clearQueue(); }); }); </script> </head> <body> <p><button id="start">Start Animation</button><button id="stop">Stop Animation</button></p> <div id="box" style="background:#98bf21;height:100px;width:100px;position:relative"> </div> </body> </html>
[インスタンスの実行] ボタンをクリックしてオンライン インスタンスを表示します