jQuery Footer
Hi.
What I'm trying to do is:
1. I have a search attribute on the website that I'm developing and then a results page for the search that I'm doing.
2. Now there are 2 things that I want from the results page:
2.1 If the results information that is being displayed is smaller than the page, I want the footer to be right at the bottom of the screen.
2.2 If the results that is being displayed is more/or bigger than the screen I want the footer to be pushed down beneath the last result that is being displayed.
I've tried to research it but cannot find a answer and have a deadline that is coming up.
This is what the script looks like that I'm currently using:
<script language="javascript">
// Window load event used just in case window height is dependant upon images
$(document).ready(function() {
var footerHeight = 0,
footerTop = 0,
$footer = $("#footer");
positionFooter();
function positionFooter() {
footerHeight = $footer.height();
footerTop = ($(window).scrollTop()+$(window).height()-footerHeight)+"px";
if (($(document.body).height()+footerHeight) < ($(window).height())) {
$footer.css({
position: "absolute"
}).animate({
})
} else {
$footer.css({
position: "static"
})
}
}
$(window)
.scroll(positionFooter)
.resize(positionFooter)
});
</script>
Thank you very much