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

Commit

Permalink
Crossing my fingers for the last fix of sticky footer
Browse files Browse the repository at this point in the history
  • Loading branch information
jmr06005 committed Jun 2, 2015
1 parent 4e24fdb commit da86f1a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions js/cs.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ jQuery(document).ready(function($) {

function stickyFoot(){
if (document.getElementById('page')!=null && document.getElementById('footers') !=null){
$('body').removeClass('sticky');
var wrapperH = $('#page').outerHeight();
var wpadminbarH = $('#wpadminbar').outerHeight();
var ucheaderH = $('#uc-header').outerHeight();
Expand All @@ -231,11 +232,8 @@ function stickyFoot(){
gformH = gformH + $(this).outerHeight();
});
windowH = windowH - wpadminbarH - ucheaderH;
wrapperH = wrapperH + footerH;
if(windowH>=wrapperH){
$('body').addClass('sticky');
} else {
$('body').removeClass('sticky');
}
}
}
Expand Down

0 comments on commit da86f1a

Please sign in to comment.