모든 사전
jQuery 관련 사전
jqueryclearQueue방법
중국어 번역
최근 업데이트: 2018-05-11 11:38:49
clear
English [klə(r)]
adj. 명확하다, 명확하다, 밝다
vi.
vt.제거하다, 깨끗하게 하다
n.틈, 공간
英[kju:] 美[kju]n. 대기열, 대기열; vi. (사람, 차량 등) 줄을 서서 기다리세요
vt. 줄을 서서 기다리세요
jqueryclearQueue방법 통사론
Function: clearQueue() 메소드는 대기열에서 아직 실행되지 않은 모든 기능을 중지합니다. stop() 메서드(애니메이션에만 작동)와는 달리, ClearQueue()는 대기열에 있는 모든 함수(.queue() 메서드를 통해 일반 jQuery 대기열에 추가된 모든 함수)를 지웁니다.
구문: $(selector).clearQueue(queueName)
매개변수:
| 매개변수 | Description |
| queueName | 선택 사항입니다. 중지할 큐의 이름을 지정합니다. 기본값은 표준 효과 대기열인 "fx"입니다. |
jqueryclearQueue방법 예
<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>온라인 인스턴스를 보려면 "인스턴스 실행" 버튼을 클릭하세요




