gitlabhq/app/assets/javascripts/behaviors/toggler_behavior.coffee

14 lines
412 B
CoffeeScript
Raw Normal View History

2012-11-22 02:08:53 +01:00
$ ->
$("body").on "click", ".js-toggler-target", ->
container = $(@).closest(".js-toggler-container")
container.toggleClass("on")
2013-03-27 19:07:52 +01:00
$("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()