Skip to content

Instantly share code, notes, and snippets.

@spencejs
Created March 22, 2013 05:57
Show Gist options
  • Save spencejs/5219291 to your computer and use it in GitHub Desktop.
Save spencejs/5219291 to your computer and use it in GitHub Desktop.
Set Div Same Height As Browser Window
/*Set Div Same Height As Browser Window*/
$(function(){
$(window).load(function(){ // On load
$('#div').css({'height':(($(window).height()))+'px'});
});
$(window).resize(function(){ // On resize
$('#div').css({'height':(($(window).height()))+'px'});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment