Skip to content

Commit

Permalink
added sticky footer
Browse files Browse the repository at this point in the history
  • Loading branch information
yimingzhaomath authored May 20, 2018
1 parent 5e4d37c commit 71e2fe2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions assets/js/_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,23 @@
========================================================================== */

$(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();

Expand Down

0 comments on commit 71e2fe2

Please sign in to comment.