Advertisement
Guest User

Untitled

a guest
Aug 27th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2.     function resize() {
  3.        
  4.         var width = Math.max(document.documentElement.clientWidth, window.innerWidth || 0)
  5.         var body = document.body,
  6.             html = document.documentElement;
  7.         $("#full-height-div").height($("#content-size-div").height());    
  8.         var height = Math.max(body.scrollHeight, body.offsetHeight,
  9.                               html.clientHeight, html.scrollHeight, html.offsetHeight);
  10.         height = height - $("#footer").height();
  11.         height = height - $("#navbar").height();
  12.         height = height - 20;
  13.         if(width < 768) {
  14.             height = height - $("#menu-container").height();
  15.         }
  16.         $("#full-height-div").height(height);
  17.     }
  18.     </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement