Home › Forums › JavaScript › My Page Jumps Down, Only on Mobile › Reply To: My Page Jumps Down, Only on Mobile
September 17, 2016 at 5:06 am
#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);
});