diff --git a/frontend/views/layouts/main.php b/frontend/views/layouts/main.php index fff0955..94fdccc 100755 --- a/frontend/views/layouts/main.php +++ b/frontend/views/layouts/main.php @@ -29,7 +29,7 @@ $('#call').call({token:'" . Yii::$app->request->getCsrfToken () . "'}); ", View::POS_READY, 'call'); -$this->registerJsFile (Yii::$app->request->baseUrl . '/js/fix_height.js', ['position' => View::POS_HEAD]); +$this->registerJsFile (Yii::$app->request->baseUrl . '/js/fix_height.js', ['position' => View::POS_HEAD, 'depends' => ['yii\web\JqueryAsset']]); $this->registerJs (" var activeTab = $('.social li:first a').attr('id'); $('.'+activeTab+'_box').show(); diff --git a/frontend/web/js/fix_height.js b/frontend/web/js/fix_height.js index e69de29..dad4a10 100644 --- a/frontend/web/js/fix_height.js +++ b/frontend/web/js/fix_height.js @@ -0,0 +1,33 @@ +$(document).ready(function(){ + autoHeight(); + function autoHeight() { + + footerBottom(); + resizeFooterBottom(); + + function footerBottom(){ + var heightHeader1 = $('nav.top').height() + var heightHeader2 = $('.section-box-header').height() + var heightHeader3 = $('.menu').height() + var heightHeader = heightHeader1+heightHeader2+heightHeader3 + var heightFooter1 = $('.bottom').height() + var heightFooter2 = $('.fotter').height() + var heightFooter = heightFooter1+heightFooter2 + var windowHeight = $(window).height() + $('.wrapper_all').css({minHeight:windowHeight-heightHeader-heightFooter}) + } + + function resizeFooterBottom(){ + $(window).resize(function(){ + footerBottom(); + }) + } + } +}) + + + + + + + -- libgit2 0.21.4