/* SF State Template style.js * This script will be the default js file to ship with the SF State Template theme. */ (function($) { Drupal.behaviors.drupaldeveloper = { attach: function (context) { $(window).on("load", function() { // Footer position calculation if($('.main-container').length) { $(window).on('load resize', function() { /* Get heights of the elements */ var headerHeight = $('#header').outerHeight(); var footerHeight = $('.footer').outerHeight(); var mainHeight = $(window).height() - headerHeight - footerHeight; // Set min height for Main div and content area $('.main-container').css({"min-height":mainHeight}); }).trigger('resize'); } // End Footer position calculation }); } } })(jQuery);