I am loading in page content via ajax, I am wanting the old content to slide up to the top dissapear, and the new content to follow it into position, my problem is that I cannot seem to get the new content to animate, it just renders on the button click (the old content does however animate). Below is my javascript,
$("#ajax").live("click", function(e){
var loadURL = $(this).attr('href');
$("#information").animate{{positionTop : "-900px" }, 1000);
$(".content").load(loadURL + " #information").animate({positionTop: "0px"}, 1000);
e.preventDefault();
});
Here is my HTML markup,
<div class="content">
<div class="loading"></div>
<article id="information">
<header>
<h1 class="beta"></h1>
<a href="" class="learn">Learn More</a>
</header>
<section class="advantage">
</section>
<section class="advantage">
</section>
<section class="advantage">
</section>
<a class="next-advantage" id="ajax" href="/logic-combi.php">Logic+ Combi</a>
</article>
</div>
The JS is requesting exactly the same setup of HTML, but only from <article id="information">