PageSourceSearch

https://blackparakeetztoo.com/wp-content/themes/woodmart/js/scripts/menu/mobileNavigation.js?ver=7.3.1

js blackparakeetztoo.com collected 2026-10-08 08:10:12 UTC 2,917 bytes, 92 lines download raw bytes

1/* global woodmart_settings */
2(function($) {
3	woodmartThemeModule.$document.on('wdCloseMobileMenu', function() {
4		woodmartThemeModule.closeMobileNavigation();
5	});
6
7	woodmartThemeModule.mobileNavigation = function() {
8		var body        = woodmartThemeModule.$body,
9		    mobileNav   = $('.mobile-nav'),
10		    dropDownCat = $('.mobile-nav .wd-nav-mobile .menu-item-has-children'),
11		    elementIcon = '<span class="wd-nav-opener"></span>';
12
13		var closeSide = $('.wd-close-side');
14
15		dropDownCat.append(elementIcon);
16
17		mobileNav.on('click', '.wd-nav-opener', function(e) {
18			e.preventDefault();
19			var $this = $(this);
20			var $parent = $this.parent();
21
22			if ($parent.hasClass('opener-page')) {
23				$parent.removeClass('opener-page').find('> ul, > .wd-sub-menu').slideUp(200);
24				$parent.removeClass('opener-page').find('.wd-dropdown-menu .container > ul, .wd-dropdown-menu > ul').slideUp(200);
25				$parent.find('> .wd-nav-opener').removeClass('wd-active');
26			} else {
27				$parent.addClass('opener-page').find('> ul, > .wd-sub-menu').slideDown(200);
28				$parent.addClass('opener-page').find('.wd-dropdown-menu .container > ul, .wd-dropdown-menu > ul').slideDown(200);
29				$parent.find('> .wd-nav-opener').addClass('wd-active');
30			}
31
32			woodmartThemeModule.$document.trigger('wood-images-loaded');
33		});
34
35		mobileNav.on('click', '.wd-nav-mob-tab li', function(e) {
36			e.preventDefault();
37			var $this = $(this);
38			var menuName = $this.data('menu');
39
40			if ($this.hasClass('wd-active')) {
41				return;
42			}
43
44			$this.parent().find('.wd-active').removeClass('wd-active');
45			$this.addClass('wd-active');
46			$('.wd-nav-mobile').removeClass('wd-active');
47			$('.mobile-' + menuName + '-menu').addClass('wd-active');
48
49			woodmartThemeModule.$document.trigger('wood-images-loaded');
50		});
51
52		body.on('click', '.wd-header-mobile-nav > a', function(e) {
53			e.preventDefault();
54
55			if (mobileNav.hasClass('wd-opened')) {
56				woodmartThemeModule.closeMobileNavigation();
57			} else {
58				$(this).parent().addClass('wd-opened');
59				openMenu();
60			}
61		});
62
63		body.on('click touchstart', '.wd-close-side', function(e) {
64			e.preventDefault();
65
66			woodmartThemeModule.closeMobileNavigation();
67		});
68
69		body.on('click', '.mobile-nav .login-side-opener, .mobile-nav .close-side-widget', function(e) {
70			e.preventDefault();
71
72			woodmartThemeModule.closeMobileNavigation();
73		});
74
75		function openMenu() {
76			mobileNav.addClass('wd-opened');
77			closeSide.addClass('wd-close-side-opened');
78			woodmartThemeModule.$document.trigger('wood-images-loaded');
79		}
80	};
81
82	woodmartThemeModule.closeMobileNavigation = function() {
83		$('.wd-header-mobile-nav').removeClass('wd-opened');
84		$('.mobile-nav').removeClass('wd-opened');
85		$('.wd-close-side').removeClass('wd-close-side-opened');
86		$('.mobile-nav .searchform input[type=text]').blur();
87	};
88
89	$(document).ready(function() {
90		woodmartThemeModule.mobileNavigation();
91	});
92})(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.