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

Commit

Permalink
Merge pull request #120 from jmr06005/master
Browse files Browse the repository at this point in the history
Stickyfooter fix
  • Loading branch information
jmr06005 committed Aug 5, 2015
2 parents 8b410e6 + 7c433af commit 78139e5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions js/cs.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,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 78139e5

Please sign in to comment.