PageSourceSearch

https://www.ziptrak.com.au/wp-content/themes/wp-theme-ziptrak/includes/js/components/footer.js?ver=1.0

js ziptrak.com.au collected 2026-10-08 01:07:25 UTC 1,057 bytes, 49 lines download raw bytes

1const CONFIG = {
2	selectors: {
3		menu: '#footer-menu',
4		parentItem: '.menu-item-has-children'
5	},
6	classes: {
7		open: 'is-open'
8	},
9	breakpoint: 600
10};
11
12document.addEventListener('DOMContentLoaded', function () {
13	const menu = document.querySelector(CONFIG.selectors.menu);
14
15	if (!menu) {
16		return;
17	}
18	const resetMenu = () => {
19		const openItems = menu.querySelectorAll(`${CONFIG.selectors.parentItem}.${CONFIG.classes.open}`);
20		openItems.forEach(item => {
21			item.classList.remove(CONFIG.classes.open);
22		});
23	};
24
25	menu.addEventListener('click', function (event) {
26		if (window.innerWidth >= CONFIG.breakpoint) {
27			return;
28		}
29
30		const targetItem = event.target.closest(CONFIG.selectors.parentItem);
31
32		if (!targetItem) {
33			return;
34		}
35
36		const allItems = menu.querySelectorAll(CONFIG.selectors.parentItem);
37		allItems.forEach(item => {
38			if (item !== targetItem) {
39				item.classList.remove(CONFIG.classes.open);
40			}
41		});
42
43		targetItem.classList.toggle(CONFIG.classes.open);
44	});
45
46	window.addEventListener('resize', () => {
47		resetMenu();
48	});
49});

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.