Last active
August 29, 2015 14:19
-
-
Save ekyfauzi/680337d853432d48d0b1 to your computer and use it in GitHub Desktop.
Autoheight
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
// Autoheight for element with class .autoheight to be 100% height | |
$('.autoheight').css({ height: $(window).innerHeight() }); | |
// Auto resize height if window resize | |
$(window).resize(function(){ | |
$('.autoheight').css({ height: $(window).innerHeight() }); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment