Pony.fm/public/scripts/shared/layout.coffee
2013-07-26 19:15:07 -05:00

18 lines
No EOL
495 B
CoffeeScript

window.handleResize = () ->
windowHeight = $(window).height()
$siteBody = $ '.site-body'
$siteBody.height windowHeight - $('header').height() - 1
$('.strech-to-bottom').each () ->
$this = $ this
$this.height windowHeight - $this.offset().top
window.alignVertically = (element) ->
$element = $(element)
$parent = $element.parent()
$element.css 'top', $parent.height() / 2 - $element.height() / 2
window.handleResize()
$(window).resize window.handleResize
$('.site-content').empty()