I'm using jQuery to refresh content in container DIV. When the refresh link is clicked, I call jQuery to remove() the content DIVs and then load() to re-create them and the content.
The problem is I have menus and navigation at the bottom and when I refresh the content, all the bottom nav gets pushed up temporarily after the DIVs are remove()'d while the Ajax content loads.
HTML:
<div id="container">
<!-- Below PHP include generates contentdiv1 and contentdiv2 -->
<?php include($_SERVER['DOCUMENT_ROOT']."/content.php"); ?>
</div>
<div id="refresh">
<a href="javascript: void(0)" id="refreshbutton">Refresh</a>
</div>
<div id="bottomnav">
<!-- nav menus and copyright type junk here is getting pushed UP^^^ -->
</div>
JAVASCRIPT:
// This occurs when the "refresh" link is clicked
$('div#contentdiv1').remove();
$('div#contentdiv2').remove();
$('div#container').load('/content.php?rnd='+ Math.random()*999999);
All help is appreciated. Thanks