I have the following HTML
<header class="fixed">...</header>
<div id="content">
<div id="sidemenu" class="fixed">...</div>
<div id="scroll">...</div>
</div>
<footer class="fixed">...</footer>
With various positioning rules in the CSS and the rule
.fixed {
position: fixed;
}
This achieves the desired affect of only the div with id scroll moves. However, this can leaves the footer out of view.
What I want to do, is once the bottom of the scroll div reaches the bottom of the footer, change position: fixed to position: absolute and then everything will scroll up together revealing the footer.
But I don't know how to do it. I was looking at waypoints but I'm in a little over my head.