Skip to content

Instantly share code, notes, and snippets.

@gimesi
Created December 29, 2013 16:09
Show Gist options
  • Save gimesi/8171920 to your computer and use it in GitHub Desktop.
Save gimesi/8171920 to your computer and use it in GitHub Desktop.
Set a div to full viewport height with JQuery.
$(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