Created
July 12, 2013 10:02
-
-
Save DrMartiner/5983303 to your computer and use it in GitHub Desktop.
Set content height to full window after resize
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
setContentHeight = () -> | |
$content = $('#content') | |
setMainHeight = () -> | |
height = $(window).height() - $('#menu').outerHeight() - $('#footer').outerHeight() | |
$content.height height | |
setMainHeight() | |
$(window).resize () -> | |
setMainHeight() | |
$(document).ready () -> | |
setContentHeight() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment