jQuery.dequeue()
jQuery.dequeue()
설명 : 일치하는 요소의 대기열에서 다음 함수를 실행합니다.
참고 : 이 방법은 낮은 수준의 방법이므로 .dequeue()대신 사용해야 합니다.
When jQuery.dequeue()가 호출 되면 큐의 다음 함수가 큐에서 제거 된 다음 실행됩니다. 이 함수는 순서대로 (직접 또는 간접적으로) jQuery.dequeue()호출되도록해야하므로 시퀀스를 계속 진행할 수 있습니다.
예:
jQuery.dequeue ()를 사용하여 대기열이 계속 이동하도록하는 사용자 정의 대기열 기능을 종료하십시오.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery.dequeue demo</title>
<style>
div {
margin: 3px;
width: 50px;
position: absolute;
height: 50px;
left: 10px;
top: 30px;
background-color: yellow;
}
div.red {
background-color: red;
}
</style>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>
<button>Start</button>
<div></div>
<script>
$( "button" ).click(function() {
$( "div" )
.animate({ left: '+=200px' }, 2000 )
.animate({ top: '0px' }, 600 )
.queue(function() {
$( this ).toggleClass( "red" );
$.dequeue( this );
})
.animate({ left:'10px', top:'30px' }, 700 );
});
</script>
</body>
</html>
게시판 목록
개발자팁
질문은 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 4706 | jQuery | 8년 전 | 1517 | ||
| 4705 | jQuery | 8년 전 | 2178 | ||
| 4704 | jQuery | 8년 전 | 1712 | ||
| 4703 | jQuery | 8년 전 | 2048 | ||
| 4702 | jQuery | 8년 전 | 1837 | ||
| 4701 | jQuery | 8년 전 | 2071 | ||
| 4700 | jQuery | 8년 전 | 1749 | ||
| 4699 | jQuery | 8년 전 | 1532 | ||
| 4698 | jQuery | 8년 전 | 1340 | ||
| 4697 | jQuery | 8년 전 | 1754 | ||
| 4696 | jQuery | 8년 전 | 2374 | ||
| 4695 | jQuery | 8년 전 | 1391 | ||
| 4694 | jQuery | 8년 전 | 1804 | ||
| 4693 | jQuery | 8년 전 | 1779 | ||
| 4692 | jQuery | 8년 전 | 2572 | ||
| 4691 | jQuery | 8년 전 | 2080 | ||
| 4690 | jQuery | 8년 전 | 1970 | ||
| 4689 | jQuery | 8년 전 | 1950 | ||
| 4688 | jQuery | 8년 전 | 1707 | ||
| 4687 | jQuery | 8년 전 | 1120 | ||
| 4686 | jQuery | 8년 전 | 1753 | ||
| 4685 | jQuery | 8년 전 | 2497 | ||
| 4684 | jQuery | 8년 전 | 2375 | ||
| 4683 | jQuery | 8년 전 | 1772 | ||
| 4682 | PHP | 8년 전 | 3094 | ||
| 4681 | jQuery | 8년 전 | 1611 | ||
| 4680 | jQuery | 8년 전 | 1799 | ||
| 4679 | PHP | 8년 전 | 2026 | ||
| 4678 | PHP | 8년 전 | 2157 | ||
| 4677 | PHP | 8년 전 | 2260 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기