Advertisement
langbung01

footer

Dec 5th, 2018
350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     function fix_height() {
  2.         var heightWithoutNavbar = $("body > #wrapper").height() - 61;
  3.         $(".sidebar-panel").css("min-height", heightWithoutNavbar + "px");
  4.  
  5.         var navbarheight = $('nav.navbar-default').height();
  6.         var wrapperHeight = $('#page-wrapper').height();
  7.  
  8.         if (navbarheight > wrapperHeight) {
  9.             $('#page-wrapper').css("min-height", navbarheight + "px");
  10.         }
  11.  
  12.         if (navbarheight < wrapperHeight) {
  13.             $('#page-wrapper').css("min-height", $(window).height() + "px");
  14.         }
  15.  
  16.         if ($('body').hasClass('fixed-nav')) {
  17.             if (navbarheight > wrapperHeight) {
  18.                 $('#page-wrapper').css("min-height", navbarheight + "px");
  19.             } else {
  20.                 $('#page-wrapper').css("min-height", $(window).height() - 60 + "px");
  21.             }
  22.         }
  23.     }
  24.  
  25.     fix_height();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement