Skip to content

Instantly share code, notes, and snippets.

@DrMartiner
Created July 12, 2013 10:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DrMartiner/5983303 to your computer and use it in GitHub Desktop.
Save DrMartiner/5983303 to your computer and use it in GitHub Desktop.
Set content height to full window after resize
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