I am trying to animate my #main div so that it fades out and slides over the top of my #header div when the "Work" think is clicked and then fade out and slide down when either the "About" or "Contact" links are clicked. Something it wrong and it is not animating up. Not sure why. Can anyone help?
http://jsbin.com/odorah/edit#javascript,html,live
I know that ideally a .slideUp/.slideDown function would be in order, but for some reason it interferes with the fittext plugin I am using. Just FYI
$(document).ready(function(){
$('#workclick').click(function(){
$('#main').animate({top:'-50%', opacity:'1'},{queue:false,duration:500, easing:"easeOutQuart"});
}, function(){
$('#header').animate({top:'0px', opacity:'0'},{queue:false,duration:200});
});
$('#aboutclick').click(function(){
$('#main').animate({top:'50%', opacity:'0'},{queue:false,duration:500, easing:"easeOutQuart"});
}, function(){
$('#header').animate({top:'0px', opacity:'1'},{queue:false,duration:200});
});
$('#contactclick').click(function(){
$('#main').animate({top:'50%', opacity:'0'},{queue:false,duration:500, easing:"easeOutQuart"});
}, function(){
$('#header').animate({top:'0px', opacity:'1'},{queue:false,duration:200});
});
});