tracman-server/static/js/footer.js

18 lines
459 B
JavaScript
Executable File

'use strict'
/* global $ */
// Push footer to bottom on pages with little content
function setFooter () {
var $windowHeight = $(window).height()
var $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
$(window).resize(function () { setFooter() })