PageSourceSearch

https://dustcontrol.uk/wp-content/themes/dustcontrol.se/static/menu.js?ver=2.6.24

js dustcontrol.uk collected 2026-10-09 23:04:18 UTC 1,710 bytes, 60 lines download raw bytes

1/**
2 * File theme.js.
3 */
4
5;(function ($) {
6    // MOBILMENYN
7    // Öppna undermenyerna
8    $(document).on('ready', function () {
9        $('.sub-menu-item-button').on('click', function () {
10            const parentItem = $(this).parent()
11            parentItem.toggleClass('sub-open')
12        })
13    })
14})(jQuery)
15
16// FIXED HEADER PÅ SCROLL
17function addFixedOnScroll() {
18    if (window.innerWidth < 768) {
19        if (window.pageYOffset >= 85) {
20            document.body.classList.add('header-fixed')
21        } else {
22            document.body.classList.remove('header-fixed')
23        }
24    } else {
25        if (window.pageYOffset >= 30) {
26            document.body.classList.add('header-fixed')
27        } else {
28            document.body.classList.remove('header-fixed')
29        }
30    }
31}
32
33window.addEventListener('load', addFixedOnScroll)
34window.addEventListener('scroll', addFixedOnScroll)
35
36// TOGGLAR SIDEBAR PÅ MOBIL
37const toggleSidebar = document.querySelector('#toggle-sidebar')
38if (toggleSidebar) {
39    toggleSidebar.addEventListener('click', function () {
40        document.body.classList.toggle('sidebar-open')
41    })
42}
43
44const langSwitcher = document.querySelector('#lang-switcher')
45if (langSwitcher) {
46    langSwitcher.addEventListener('click', () => {
47        if (document.body.classList.contains('lang-open')) {
48            document.body.classList.remove('lang-open')
49        } else {
50            document.body.classList.add('lang-open')
51        }
52    })
53}
54
55const comFlag = document.querySelector('.lang-item-com_com img')
56if (comFlag) {
57    document.addEventListener('DOMContentLoaded', function (e) {
58        comFlag.setAttribute('src', `${lwGlobal.themeDir}/assets/com_flag.png`)
59    })
60}

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.