Make footer stick to the bottom of the page

- Use JavaScript to determine height of `.page_footer` to apply padding to `body` avoiding any content overlap
- Absolute position `.page_footer` to bottom of the page
This commit is contained in:
Michael Rose
2016-07-20 09:10:37 -04:00
parent fc0f8f5b1d
commit 9a9cbc01e3
5 changed files with 37 additions and 6 deletions

View File

@@ -4,6 +4,24 @@
$(document).ready(function(){
// Sticky footer
var bumpIt = function() {
$('body').css('margin-bottom', $('.page__footer').outerHeight(true));
},
didResize = false;
bumpIt();
$(window).resize(function() {
didResize = true;
});
setInterval(function() {
if(didResize) {
didResize = false;
bumpIt();
}
}, 250);
// FitVids init
$("#main").fitVids();

10
assets/js/main.min.js vendored

File diff suppressed because one or more lines are too long