2012-11-21 20:08:53 -05:00
|
|
|
$ ->
|
2014-03-11 09:15:08 -04:00
|
|
|
# Toggle button. Show/hide content inside parent container.
|
|
|
|
# Button does not change visibility. If button has icon - it changes chevron style.
|
|
|
|
#
|
|
|
|
# %div.js-toggle-container
|
|
|
|
# %a.js-toggle-button
|
|
|
|
# %div.js-toggle-content
|
|
|
|
#
|
|
|
|
$("body").on "click", ".js-toggle-button", (e) ->
|
2013-03-27 14:07:52 -04:00
|
|
|
$(@).find('i').
|
|
|
|
toggleClass('icon-chevron-down').
|
|
|
|
toggleClass('icon-chevron-up')
|
2013-08-06 11:49:37 -04:00
|
|
|
$(@).closest(".js-toggle-container").find(".js-toggle-content").toggle()
|
2013-08-06 11:45:45 -04:00
|
|
|
e.preventDefault()
|