Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript My Page Jumps Down, Only on Mobile Reply To: My Page Jumps Down, Only on Mobile

#245649
grebre0
Participant

Yep, my mistake

function setHeight() {
   var windowHeight = $(window).height(),
       $block = $('.video-content');
    if(windowHeight > 550) { // 550px is your css min-height for this block
        $block.css({'min-height': windowHeight + 'px'}) 
    } else {
       $block.css({'min-height': ''}) 
    }
}

$(document).ready(function() {
    setHeight();
   $(window).on('resize orientationchange', setHeight);
});