1/* 2 * Burger menu navigation style. This script will run only when Burger style is selected on desktop. 3 */ 4 ( function( $ ) { 5 // This library only run when the Navigation Style is Burger on Dekstop screen. (1 case). 6 var burger_menu_container = $( '.mkhb-navigation-resp__container--burger-desktop' ); 7 burger_menu_container.on( 'click', function( e ) { 8 var $this = $( this ), 9 $body = $( 'body' ), 10 // Only select current navigation wrapper. 11 $fullscreen_box = $this.parent().find( '.mkhb-navigation-resp__nav' ); 12 13 // @see js/src/elementClickEvents.js 14 if ( e.stopPropagation ) { 15 e.stopPropagation(); 16 } else if ( window.event ) { 17 window.event.cancelBubble = true; 18 } 19 20 // @see components/layout/header/menu-sidebar.js 21 // @todo HB only support fullscreen right now. 22 if ( $this.hasClass( 'dashboard-style' ) ) { 23 if ( ! $this.hasClass( 'dashboard-active' ) ) { 24 $this.addClass( 'dashboard-active' ); 25 $body.addClass( 'dashboard-opened' ); 26 } else { 27 $this.removeClass( 'dashboard-active' ); 28 $body.removeClass( 'dashboard-opened' ); 29 } 30 } else if ( $this.hasClass( 'fullscreen-style' ) ) { 31 if ( ! $this.hasClass( 'fullscreen-active' ) ) { 32 $this.addClass( 'fullscreen-active' ); 33 $body.addClass( 'fullscreen-nav-opened' ); 34 $fullscreen_box.addClass( 'opened' ); 35 } else { 36 $this.removeClass( 'fullscreen-active' ); 37 $body.removeClass( 'fullscreen-nav-opened' ); 38 $fullscreen_box.removeClass( 'opened' ); 39 } 40 } 41 e.preventDefault(); 42 }); 43 44 // @see components/layout/header/fullscreen-nav.js 45 $( '.mk-fullscreen-nav-close, .mk-fullscreen-nav-wrapper, #fullscreen-navigation a' ).on( 'click', function(e) { 46 burger_menu_container.removeClass( 'fullscreen-active' ); 47 }); 48})( jQuery );
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.