Created
August 7, 2015 02:56
-
-
Save AndyLampert/0581c4daa2d84458c8f9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
function resizeDiv() { | |
var vph = ( $(window).height() - 150 ); // adjust this as needed | |
var screen_width = $(window).width(); | |
if (screen_width > 1199) { | |
$('.element-to-resize').css({'height': vph + 'px'}); | |
} else { | |
$('.element-to-resize').css({'height': '585px'}); // adjust this as needed | |
} | |
} | |
resizeDiv(); | |
window.onresize = function(event) { | |
resizeDiv(); | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment