Created
December 29, 2013 16:09
-
-
Save gimesi/8171920 to your computer and use it in GitHub Desktop.
Set a div to full viewport height with JQuery.
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(){ | |
// set the intro div automatically to full viewport height | |
$('.intro').height($(window).height()); | |
// ensure it stays this way when the window is resized | |
$(window).resize(function(){ | |
$('.intro').height($(window).height()); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment