PageSourceSearch

https://thekindlingagency.com/wp-content/themes/asri-child/js/close-mobile-menu.js?ver=1.0

js thekindlingagency.com collected 2026-10-07 22:21:23 UTC 740 bytes, 24 lines download raw bytes

1document.addEventListener('DOMContentLoaded', function () {
2  var mobileMenu = document.getElementById('pxl-header-mobile');
3  if (!mobileMenu) return;
4
5  var closeButton = mobileMenu.querySelector('.pxl-menu-close');
6  if (!closeButton) return;
7
8  var allLinks = mobileMenu.querySelectorAll('a[href]');
9
10  allLinks.forEach(function (link) {
11    // link.hash and link.pathname are resolved by the browser,
12    // so this works whether href is "#section", "/#section",
13    // or "https://yoursite.com/#section"
14    var isSamePageAnchor =
15      link.hash &&
16      link.pathname === window.location.pathname;
17
18    if (isSamePageAnchor) {
19      link.addEventListener('click', function () {
20        closeButton.click();
21      });
22    }
23  });
24});

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.