Created
December 26, 2012 17:20
-
-
Save jlittlejohn/4381605 to your computer and use it in GitHub Desktop.
JS: Make Div Height Equal to Window
This file contains hidden or 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
var height = $(window).height() - 25; | |
$('#sidebar').height(height - 170); | |
window.onresize = function(event) { | |
var height = $(window).height() - 25; | |
$('#sidebar').height(height - 170); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment