Sha256: 05ba9d790d89050fba5a54518346727b7a78a52414995f06430d0e5b23568c38

Contents?: true

Size: 540 Bytes

Versions: 8

Compression:

Stored size: 540 Bytes

Contents

$(window).on 'load resize',  ->
  equalizeColumns()

equalizeColumns = ->
  $('.row.equalize').each ->
    $row = $ this
    tallest = 0
    collapsed = false

    $row.children().each (i) ->
      $this = $ this
      $this.css('minHeight','1px')
      collapsed = ($this.outerWidth() == $row.outerWidth())
      unless collapsed
        $this.addClass('equal') unless $this.hasClass('equal')
        if $this.outerHeight() > tallest
          tallest = $this.outerHeight()

    $row.children().css('min-height', tallest) unless collapsed

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
groundworkcss-2.3.7 app/assets/javascripts/groundworkcss/components/equalizeColumns.coffee
groundworkcss-2.3.6 app/assets/javascripts/groundworkcss/components/equalizeColumns.coffee
groundworkcss-2.3.5 app/assets/javascripts/groundworkcss/components/equalizeColumns.coffee
groundworkcss-2.3.4 app/assets/javascripts/groundworkcss/components/equalizeColumns.coffee
groundworkcss-2.3.3 app/assets/javascripts/groundworkcss/components/equalizeColumns.coffee
groundworkcss-2.3.2 app/assets/javascripts/groundworkcss/components/equalizeColumns.coffee
groundworkcss-2.3.1 app/assets/javascripts/groundworkcss/components/equalizeColumns.coffee
groundworkcss-2.2.1 app/assets/javascripts/groundworkcss/components/equalizeColumns.coffee