PageSourceSearch

https://www.landesentwicklung-bw.de/assets/26805c26/navigation-toggle.js

js landesentwicklung-bw.de collected 2026-10-04 09:49:48 UTC 1,269 bytes, 39 lines download raw bytes

1window.addEventListener('DOMContentLoaded', function () {
2    var naviToggle = document.querySelector('[data-toggle="navi"]')
3    var navi = document.querySelector('.navi')
4
5    var openNavi = function () {
6        navi.classList.add('navi-open')
7        naviToggle.setAttribute('aria-expanded', 'true')
8        naviToggle.classList.add('navi-toggle-open')
9        naviToggle.focus()
10    }
11
12    var closeNavi = function () {
13        navi.classList.remove('navi-open')
14        naviToggle.setAttribute('aria-expanded', 'false')
15        naviToggle.classList.remove('navi-toggle-open')
16    }
17
18    naviToggle.addEventListener('click', function () {
19        if (navi.classList.contains('navi-open')) {
20            closeNavi()
21        } else {
22            openNavi()
23        }
24    })
25
26    // Accessibility: Set tab index to 0 as there are no functional dropdowns.
27    var naviMenuItems = document.querySelectorAll('.navi-menu-items a')
28
29    naviMenuItems.forEach(function (item) {
30        item.setAttribute('tabindex', '0')
31    })
32
33    document.addEventListener('keyup', function (event) {
34        if ((event.key === 'Escape' || event.keyCode === 27) && navi.classList.contains('navi-open')) {
35            naviToggle.focus()
36            naviToggle.click()
37        }
38    })
39})

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.