PageSourceSearch

https://americantheatrewing.org/wp-content/themes/atw/js/atw/clickmenu.js?ver=1.0

js americantheatrewing.org collected 2026-09-24 17:22:29 UTC 2,153 bytes, 114 lines download raw bytes

1/**
2 *		ATW JS module:
3 *			clickmenu.js
4 *
5 *		Desc:
6 *			Open menu when click burger-container
7 *
8 *		Requires:
9 *			jQuery
10 */
11
12var krnl = ( function( app, $ ) {
13
14	/* define new module */
15	app.clickmenu = ( function( $ ) {
16
17		// private vars
18		var _name = 'Clickmenu',
19			_initialized = null,
20			_debug_enable = true,
21			debug = null,
22			_enable = true,
23			_config = {},
24			$burger = $( 'header .burger-container' ),
25			$menu = $( '.overlay-menu' )
26		;
27
28		/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
29
30		function _init() {
31
32			// if ( _initialized ) return;
33
34			/* * * * * * * * * * * * * * * * * * * */
35
36			// debug = ( _debug_enable ) ? krnl.util.debug : function(){};
37
38			// Subscribe to mediator
39			// _subscribe();
40
41			$burger.on( 'click', function() {
42
43				if ( $menu.hasClass( 'active' ) ) {
44
45					$menu.removeClass( 'active' );
46
47					$( '.line.middle' ).removeClass( 'close' )
48
49					$('body').removeClass('is-menu-open');
50
51				} else {
52
53					$menu.addClass( 'active' );
54
55					$( '.line.middle' ).addClass( 'close' )
56
57					$('body').addClass('is-menu-open');
58
59				}
60
61			})
62
63			// Example broadcast
64			// krnl.mediator.broadcast( 'ExampleInit' );
65
66			/* * * * * * * * * * * * * * * * * * * */
67
68			// _initialized = true;
69
70		}
71
72		/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
73
74		/* Subscribe to mediator
75		 *
76		 */
77
78		function _subscribe() {
79
80			app.mediator.add( _name, function() {
81
82				return {
83
84					name: _name,
85
86					onExampleInit: function() {
87
88						// debug( _name + ': module has initialized' );
89
90					}
91
92				};
93
94			}());
95
96		}
97
98		/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
99
100		/* return public-facing methods and/or vars */
101		return {
102			init : _init
103		};
104		
105	}($));
106	
107	return app; /* return augmented app object */
108	
109}( krnl || {}, jQuery ) ); /* import app if exists, or create new; import jQuery */
110
111/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
112
113// register this module for initialization
114krnl.bootstrap.register( krnl.clickmenu.init );

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.