joehealy
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Jalbee] Menu stops working sometimesI fixed it with the following patch:
diff navigation.js_orig navigation.js
2a3
>
11,13c12,13
< var JALBEE_SITENAV = document.querySelector(‘.main-navigation’),
< JALBEE_KEYMAP = {
< TAB: 9
—
> var JALBEE_KEYMAP = {
> TAB: 9
16,20c16,22
< // Initiate the menus when the DOM loads.
< // document.addEventListener(‘DOMContentLoaded’, function () {
< // jalbeeInitMainNavigation();
< // jalbeeInitMenuToggle();
< // });
—
> if ( ‘loading’ === document.readyState ) {
> // The DOM has not yet been loaded.
> document.addEventListener( ‘DOMContentLoaded’, initNavigation );
> } else {
> // The DOM has already been loaded.
> initNavigation();
> }
21a24,25
> // Initiate the menus when the DOM loads.
> function initNavigation() {
24c28,31
< /**
—
> doSomethingElse();
> };
>
> /**
28a36,37
> const JALBEE_SITENAV = document.querySelector(‘.main-navigation’);
>
120a130,136
> const JALBEE_SITENAV = document.querySelector(‘.main-navigation’);
>
> // No point if no site nav.
> if (!JALBEE_SITENAV) {
> return;
> }
>
235a252,259
> function doSomethingElse() {
> const JALBEE_SITENAV = document.querySelector(‘.main-navigation’);
>
> // No point if no site nav.
> if (!JALBEE_SITENAV) {
> return;
> }
>
262c286,288
< })();
\ No newline at end of file
—
> }
>
> })();Forum: Themes and Templates
In reply to: [Jalbee] Menu stops working sometimesThis issue in wprig is relevant: