Blame view

frontend/web/js/fix_height.js 921 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()
ebe47416   Виталий   Веталь
17
18
19
20
21
  			$('.wrapper_all').css({minHeight:(windowHeight-heightHeader-heightFooter)-60})
  			if(($('.wrapper_all .site-error').length)>=1) {
  				$('.wrapper_all').css({minHeight:(windowHeight-heightHeader-heightFooter)-70})
  			}
  			$('#bg').css({minHeight:windowHeight})
36706045   Виталий   Веталь
22
23
24
25
26
27
28
29
  		}
  
  		function resizeFooterBottom(){
  			$(window).resize(function(){
  				footerBottom();
  			})
  		}
  	}
f35dd76d   Виталий   Веталь
30
  }
36706045   Виталий   Веталь