Sha256: 0ec0f8ef9a6b0a34b2e570a516238c7830888ddc15a182c45d930b62b1702ebf
Contents?: true
Size: 672 Bytes
Versions: 50
Compression:
Stored size: 672 Bytes
Contents
$(document).ready -> $(".js-accordion-trigger").each (index, element) -> target = $(this).data("target") # Init if $(target).is(":visible") $(this).text($(this).attr("data-text-close")) $(this).addClass "is-open" else $(this).text($(this).attr("data-text-open")) $(this).bind "click focus", -> target = $(this).data("target") $(target).slideToggle "fast" $(target).toggleClass "is-open" $(this).toggleClass "is-open" if $(target).hasClass("is-open") $(this).text($(this).attr("data-text-open")) else $(this).text($(this).attr("data-text-close")) event.preventDefault()
Version data entries
50 entries across 50 versions & 1 rubygems