(function($) { $(document).ready(function() { $mmenu = $("#apt_mmenu"); $hamburger = $("#apt_mmenu_hamburger"); $mmenu.mmenu({ "offCanvas": { "position": "right" }, "extensions": [ "effect-menu-zoom", "pagedim-black" ] }, { // configuration classNames: { fixedElements: { // Told Mmenu what elements on website are using the css rule 'position: fixed' fixed: "mmenu-fixed-element" // the class name used in .site-header element. This class name will be removed by mmenu after it setup compatibility with fixed elements. } } }); var API = $mmenu.data( "mmenu" ); $hamburger.click(function() { API.close(); }); }); })(jQuery);