Site/src/scripts/index.js

14 lines
516 B
JavaScript
Raw Normal View History

$(document).ready(function() {
resetContentSize()
});
function resetContentSize() {
console.log("Fixing main-content height:");
let mainContent = document.getElementById('main-content');
var offsetHeight = Number(mainContent.offsetHeight);
console.log("\tHeight was: " + offsetHeight);
var newHeight = offsetHeight + 30;
console.log("\tSetting css: " + 'height:'+newHeight+'px');
mainContent.setAttribute('style', 'height:'+newHeight+'px');
console.log("\tHeight become: " + mainContent.offsetHeight);
}