1
0
mirror of https://gitlab.com/Deukhoofd/BattleSim.git synced 2025-09-02 08:57:19 +00:00
BattleSim/client/app/js/concerns/toggle_navigation.coffee
2016-02-01 23:19:30 +01:00

10 lines
363 B
CoffeeScript

# Used to handle the show navigation button in the header, which is visible when the browser
# window becomes small enough.
$ ->
$navigation = $("#navigation")
$(".show-navigation").click =>
active = $navigation.hasClass('active')
$navigation.toggleClass('active', !active)
$navigation.on 'click', '.nav_item', -> $navigation.removeClass("active")