Blame view

frontend/web/js/fix_height.js 881 Bytes
f35dd76d   Виталий   Веталь
1
  window.onload = function() {
36706045   Виталий   Веталь
2
3
4
5
6
7
8
  	autoHeight();
  	function autoHeight() {
  
  		footerBottom();
  		resizeFooterBottom();
  
  		function footerBottom(){
f35dd76d   Виталий   Веталь
9
10
11
12
13
14
15
  			var heightHeader1 = $('nav.top').outerHeight()
  			var heightHeader2 = $('.header').outerHeight()
  			var heightHeader3 = $('.menu').outerHeight()
  			var heightHeader = (heightHeader1+heightHeader2+heightHeader3)
  			var heightFooter1 = $('.bottom').outerHeight()
  			var heightFooter2 = $('.fotter').outerHeight()
  			var heightFooter = (heightFooter1+heightFooter2)
36706045   Виталий   Веталь
16
  			var windowHeight = $(window).height()
f35dd76d   Виталий   Веталь
17
  			windowHeight=windowHeight-43
36706045   Виталий   Веталь
18
  			$('.wrapper_all').css({minHeight:windowHeight-heightHeader-heightFooter})
f35dd76d   Виталий   Веталь
19
20
21
  
  console.log(windowHeight-heightHeader-heightFooter)
  			console.log((windowHeight-heightHeader-heightFooter)-43)
36706045   Виталий   Веталь
22
23
24
25
26
27
28
29
  		}
  
  		function resizeFooterBottom(){
  			$(window).resize(function(){
  				footerBottom();
  			})
  		}
  	}
f35dd76d   Виталий   Веталь
30
  }
36706045   Виталий   Веталь