gitlabhq/app/assets/javascripts/behaviors/toggler_behavior.coffee
2013-03-27 20:07:52 +02:00

14 lines
412 B
CoffeeScript

$ ->
$("body").on "click", ".js-toggler-target", ->
container = $(@).closest(".js-toggler-container")
container.toggleClass("on")
$("body").on "click", ".js-toggle-visibility-link", (e) ->
$(@).find('i').
toggleClass('icon-chevron-down').
toggleClass('icon-chevron-up')
container = $(".js-toggle-visibility-container")
container.toggleClass("hide")
e.preventDefault()