PageSourceSearch

https://ticket-compare.it/wp-content/themes/ticket-compare/blocks/header/menu/menuView.js

js ticket-compare.it collected 2026-09-30 11:37:25 UTC 854 bytes, 31 lines download raw bytes

1/**
2 * Menu and navigational functions (mostly mobile)
3 * @constructor
4 */
5class MenuView {
6    // Rest lines should be removed after redesign
7
8    /**
9     * Open and close mobile menu
10     * @param {Element} el
11     * @param {Element} navEl
12     */
13    static toggleMobileMenu(el, navEl) {
14        navEl.classList.toggle('open');
15        el.classList.toggle('active');
16    }
17
18    /**
19     * Opens mobile menu items
20     * @param {Element} li_elem
21     */
22    static toggleList(li_elem) {
23        const ulElements = li_elem.querySelectorAll('ul');
24        ulElements.forEach(ul => {
25            const isHidden = !ul.style.display || ul.style.display === 'none';
26            ul.style.opacity = isHidden ? 1 : 0;
27            ul.style.transition = 'opacity 400ms ease 400ms';
28            ul.style.display = isHidden ? 'block' : 'none';
29        });
30    }
31}

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.