Sha256: 21717e2defb94968f76ce3a3e77e96fe5b88ca7ee33ffd417640842df321b457

Contents?: true

Size: 440 Bytes

Versions: 6

Compression:

Stored size: 440 Bytes

Contents

$(window).bind "load", ->
  adjustFooter = ->
    $("footer").css({ 'margin-top': calcHeight() + 'px' })

  calcHeight = ->
    footer = $("footer")
    position = footer.position()
    footer_top = if position is undefined then 0 else position.top
    height = $(window).height() - footer_top - footer.height()
    Math.max(height, 50)

  adjustFooter()
  $("a.asset-link.clearfix").click ->
    setTimeout ->
      adjustFooter()
    , 1

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ama_layout-1.1.22 app/assets/javascripts/ama_layout/desktop/sticky-footer.coffee
ama_layout-1.1.21 app/assets/javascripts/ama_layout/desktop/sticky-footer.coffee
ama_layout-1.1.20 app/assets/javascripts/ama_layout/desktop/sticky-footer.coffee
ama_layout-1.1.15 app/assets/javascripts/ama_layout/desktop/sticky-footer.coffee
ama_layout-1.1.14 app/assets/javascripts/ama_layout/desktop/sticky-footer.coffee
ama_layout-1.1.13 app/assets/javascripts/ama_layout/desktop/sticky-footer.coffee