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:
@@ -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
10
assets/js/main.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user