PageSourceSearch

https://aafa.org/wp-content/themes/AAFA/menu-divider.js

js aafa.org collected 2026-09-24 08:42:23 UTC 1,019 bytes, 25 lines download raw bytes

1(function ($) {
2    function updateMenuHeights() {
3        // Select all .mega-sub-menu elements within #mega-menu-primary-menu
4        const megaSubMenus = document.querySelectorAll('#mega-menu-primary-menu > li > .mega-sub-menu');
5
6        // Log the height of each mega-sub-menu and set .mega-mega-info::before height
7        megaSubMenus.forEach((menu, index) => {
8            const height = menu.offsetHeight;
9
10            // Find .mega-mega-info elements within this menu
11            const megaInfoElements = menu.querySelectorAll('.mega-mega-info');
12
13            // Set CSS custom property for each .mega-mega-info element
14            megaInfoElements.forEach((infoElement) => {
15                infoElement.style.setProperty('--menu-height', height + 'px');
16            });
17        });
18    }
19
20    // Run on initial load
21    window.addEventListener("DOMContentLoaded", updateMenuHeights);
22
23    // Run on window resize
24    window.addEventListener("resize", updateMenuHeights);
25})(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.