tracman-server/static/js/footer.js

18 lines
445 B
JavaScript
Raw Normal View History

'use strict';
/* global $ */
2017-06-30 14:38:30 -06:00
// Push footer to bottom on pages with little content
function setFooter(){
var windowHeight = $(window).height(),
footerBottom = $("footer").offset().top + $("footer").height();
if (windowHeight > footerBottom){
$("footer").css( "margin-top", windowHeight-footerBottom );
}
}
// Execute on page load
$(function(){ setFooter(); });
// Execute on window resize
2017-08-22 17:32:25 -06:00
$(window).resize(function(){ setFooter(); });