Sha256: ecfef3f96f74d66ac54357ec5da037fbd3ca315aa6f1939f5bc120fc529853a0
Contents?: true
Size: 709 Bytes
Versions: 83
Compression:
Stored size: 709 Bytes
Contents
class Tenon.features.HamburgerNavigation constructor: -> @$navigation = $('.nav-holder, .hamburger-toggle') @$head = $('util-nav') @$toggle = @$head.find('.hamburger a') @openClass = 'mobile-open' # listeners @$toggle.on('click', @toggleNav) $(document).on('click', '.nav-holder.mobile-open a', @_closeNav) toggleNav: (e) => e.preventDefault() @$toggle.find('i').toggleClass('fa-bars fa-times') if @$toggle.hasClass(@openClass) @_closeNav() else @_openNav() _closeNav: () => @$toggle.removeClass(@openClass) @$navigation.removeClass(@openClass) _openNav: () => @$toggle.addClass(@openClass) @$navigation.addClass(@openClass)
Version data entries
83 entries across 83 versions & 1 rubygems