Sha256: 7739fcee4d608198ebab1285c840b7079d6164323b2fe3f954b5b8a5a732dbd7

Contents?: true

Size: 367 Bytes

Versions: 3

Compression:

Stored size: 367 Bytes

Contents

ready = ()->
  toggles = document.getElementsByClassName('toggle')
  Array.prototype.forEach.call(toggles, (t)->
    collapse_id = t.dataset.collapse
    collapse = document.getElementById(collapse_id)
    t.onclick = ->
        $(collapse).toggleClass('rolled-down')
        $(t).toggleClass('rotated')
  )

$(document).on 'page:load', ready
$(document).ready ready

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
more_responsive_less_u_i-rails-0.0.7 app/assets/javascripts/elements/collapse.js.coffee
more-responsive-less-ui-0.0.3 app/assets/javascripts/elements/collapse.js.coffee
more-responsive-less-ui-0.0.2 app/assets/javascripts/elements/collapse.js.coffee