?foru
06-18-2014, 03:50 PM
The code below animates divs site1 and site2 to the left and I need to "hide" div 3 until it's animation is ready then center it in the page by using
$('.site3').animate({left: $(".site3").width() / 2}, 1000);
$(".site1").click(function(){
$(".site1").animate({'left': "-=2550"}, 1000, 'swing');
$(".site2").animate({'left': "-=2550"}, 1000, 'swing');
//div 3 will be hidden until it swings in from the left
$('.site3').animate({left: $(".site3").width() / 2}, 1000);
// redirect to external site after site3 animates in and shows a graphic
$(".site1").after( "<meta http-equiv=\"refresh\" content=\"2;url=http://www.example.com\">" );
});
Any help is appreciated, thank you.
$('.site3').animate({left: $(".site3").width() / 2}, 1000);
$(".site1").click(function(){
$(".site1").animate({'left': "-=2550"}, 1000, 'swing');
$(".site2").animate({'left': "-=2550"}, 1000, 'swing');
//div 3 will be hidden until it swings in from the left
$('.site3').animate({left: $(".site3").width() / 2}, 1000);
// redirect to external site after site3 animates in and shows a graphic
$(".site1").after( "<meta http-equiv=\"refresh\" content=\"2;url=http://www.example.com\">" );
});
Any help is appreciated, thank you.