Sha256: 3ce45b96823a904317f2bc7d650a8e7c0d7b7ea35da95b015e81c3f66b9db8d2

Contents?: true

Size: 524 Bytes

Versions: 11

Compression:

Stored size: 524 Bytes

Contents

$(window).bind
  load: ->
    adjustFooter()
    accordionAdjust()
  resize: ->
    adjustFooter()
    accordionAdjust()

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

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

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)

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ama_layout-2.1.2 app/assets/javascripts/ama_layout/desktop/sticky-footer.coffee
ama_layout-2.1.1 app/assets/javascripts/ama_layout/desktop/sticky-footer.coffee
ama_layout-2.1.0 app/assets/javascripts/ama_layout/desktop/sticky-footer.coffee
ama_layout-2.0.6 app/assets/javascripts/ama_layout/desktop/sticky-footer.coffee
ama_layout-2.0.5 app/assets/javascripts/ama_layout/desktop/sticky-footer.coffee
ama_layout-2.0.3 app/assets/javascripts/ama_layout/desktop/sticky-footer.coffee
ama_layout-2.0.2 app/assets/javascripts/ama_layout/desktop/sticky-footer.coffee
ama_layout-2.0.0 app/assets/javascripts/ama_layout/desktop/sticky-footer.coffee
ama_layout-1.1.25 app/assets/javascripts/ama_layout/desktop/sticky-footer.coffee
ama_layout-1.1.24 app/assets/javascripts/ama_layout/desktop/sticky-footer.coffee
ama_layout-1.1.23 app/assets/javascripts/ama_layout/desktop/sticky-footer.coffee