Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Stickyfooter fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jmr06005 committed Aug 5, 2015
1 parent 8594263 commit 98ba955
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions js/cs.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ function stickyFoot(){
var footerH = $('#footers').outerHeight();
var windowH = window.innerHeight;
var gformH = 0;
console.log(wrapperH);
$('.gform_wrapper').each(function(){
gformH = gformH + $(this).outerHeight();
});
Expand All @@ -246,6 +247,25 @@ $(window).resize(function() {
$(window).load(function() {
stickyFoot();
});
function onElementHeightChange(elm, callback){
var lastHeight = elm.clientHeight, newHeight;
(function run(){
newHeight = elm.clientHeight;
if( lastHeight != newHeight )
callback();
lastHeight = newHeight;

if( elm.onElementHeightChangeTimer )
clearTimeout(elm.onElementHeightChangeTimer);

elm.onElementHeightChangeTimer = setTimeout(run, 200);
})();
}


onElementHeightChange(document.body, function(){
stickyFoot();
});

$('.panel, .collapse').on('shown.bs.collapse', function (e) {
stickyFoot();
Expand Down

0 comments on commit 98ba955

Please sign in to comment.