I want three events to run after another so 1st line finishes then second line starts after that 3rd line start...so next element(effect) should wait until previous effect is finished?
Thanks
ORIGINAL CODE:
$('.login_menu_arrow.top').click(function(event)
{
$("#login_menu").slideUp();
$('.login_menu_arrow.top').hide();
$('.login_menu_arrow.bottom').show();
event.stopPropagation();
});
My test which won't work:
Source: A way to chain a sequence of events in JQuery?
1:
$('.login_menu_arrow.top').click(function(event)
{
$("#login_menu").slideUp(function() {
$('.login_menu_arrow.top').hide(function() {
$('.login_menu_arrow.bottom').show();
});
});
});
Source: 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();
});
});