세 번째 이벤트가 실행되어 첫 번째 라인이 끝난 다음 세 번째 라인이 시작된 후 두 번째 라인이 시작됩니다. 그러면 다음 요소 (효과)는 이전 효과가 끝날 때까지 기다려야합니까?Jquery effects가 실행되기 전에 이전에 끝날 때까지 기다림
감사
ORIGINAL CODE :
$('.login_menu_arrow.top').click(function(event)
{
$("#login_menu").slideUp();
$('.login_menu_arrow.top').hide();
$('.login_menu_arrow.bottom').show();
event.stopPropagation();
});
작동하지 않습니다
내 시험 :
출처 : A way to chain a sequence of events in JQuery?
1 :
을3210$('.login_menu_arrow.top').click(function(event)
{
$("#login_menu").slideUp(function() {
$('.login_menu_arrow.top').hide(function() {
$('.login_menu_arrow.bottom').show();
});
});
});
출처 : How do you get JQuery to wait until an effect is finished?
2 : 당신이 그것으로 콜백을 사용하지 않도록
$('.login_menu_arrow.top').click(function(event)
{
$(this).queue(function() {
$("#login_menu").slideUp();
$(this).dequeue();
}).queue(function() {
$('.login_menu_arrow.top').hide();
$(this).dequeue();
}).queue(function() {
$('.login_menu_arrow.bottom').show();
$(this).dequeue();
});
});
감사합니다. 나는'.promise() '도 살펴볼 것이다. – BentCoder