app/assets/javascripts/partystreusel/offcanvas.js.coffee in partystreusel-1.1.0pre2 vs app/assets/javascripts/partystreusel/offcanvas.js.coffee in partystreusel-1.1.0

- old
+ new

@@ -9,9 +9,13 @@ @$el.find('.offcanvas__overlay').on 'click', @toggle @$el.find('.offcanvas-nav__link').on 'click', @toggleNavLink toggle: => @$el.toggleClass('offcanvas--open') + if @$el.hasClass('offcanvas--open') + @trigger('open', @$el) + else + @trigger('close', @$el) toggleNavLink: (e) => navLink = $(e.target).closest('.offcanvas-nav__link') subNav = navLink.next('.offcanvas-nav__sub') return if subNav.length == 0