Skip to content

Instantly share code, notes, and snippets.

@piercemoore
Created March 4, 2012 00:56
Show Gist options
  • Select an option

  • Save piercemoore/1969584 to your computer and use it in GitHub Desktop.

Select an option

Save piercemoore/1969584 to your computer and use it in GitHub Desktop.
jQuery Function to Place Footer at the bottom of the page
<script type="text/javascript">
function placeFooter() {
if( $(document.body).height() < $(window).height() ) {
$("#footer").css({position: "absolute", bottom:"0px"});
} else {
$("#footer").css({position: ""});
}
}
placeFooter();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment