i got a problem again..
$(".menu-container").animate({top:"25px"},
function() {
$(".menu-container").animate({top:"-900px"});
$(".windows-container").animate({top:"-730px"});
});
$(".menu-container").hide(function(){
$(".webPageFrame").attr("src","");
addMenuButtons('main-menu',MenuTitleMain);
addLastMenuButtons('last-menu','Login');
menuBordersAndCorners('main-menu');
lastMenuBordersAndCorners('last-menu');
});
$(".menu-container").show();
$(".menu-container").animate({top:"0px"});
i think the last 2 lines are not executing.. i have not seen the .menu-container and did not animate to top:0px;
In this part:
You are queuing the
.animate({top:"-900px"});after the.animate({top:"0px"});has been queued at the bottom, you need to get it on the queue stack before then, like this:Currently here’s what’s happening:
.menu-containerstarts animating totop: 25px.menu-containerqueues thetop: 0pxanimation`.menu-containerfinishes animating totop: 25pxit then queues thetop: -900pxanimation.So the result is it’s animating to 25, 0 then -900, because of the order items are inserted into the queue. I’m still not sure that the
hide()andshow()order are what you’re after, but that’s the reason you’re not seeing the element, it’s ending up 900px above the window 🙂Update: Based on comments, I think this is closer to what you’re after:
.hide()and.show()(when not giving a duration > 0) aren’t queued, so happen immediately…this does the work once it’s 900px out of view.