PageSourceSearch

https://gardenflowshop.se/wp-content/themes/garden-care-lite/js/custom.js

js gardenflowshop.se collected 2026-09-27 10:36:57 UTC 1,716 bytes, 58 lines download raw bytes

1/* Search Form Toggle */
2jQuery(document).ready(function() {
3	jQuery(".header-search-toggle").click(function() {
4	   jQuery(".header-search-form").toggle();
5	   jQuery(".header-search-form .search-field").focus();
6	 });
7});
8
9/*Mobile Menu Handle*/
10jQuery(document).ready(function () {
11/* MOBILE TOGLLE MENU HANDLE*/
12var menuFocus, navToggleItem, focusBackward;
13var menuToggle = document.querySelector('.menu-toggle');
14var navMenu = document.querySelector('.nav-menu');
15var navMenuLinks = navMenu.getElementsByTagName('a');
16var navMenuListItems = navMenu.querySelectorAll('li');
17var nav_lastIndex = navMenuListItems.length - 1;
18var navLastParent = document.querySelectorAll('.main-navigation > ul > li').length - 1;
19
20document.addEventListener('menu_focusin', function () {
21    menuFocus = document.activeElement;
22    if (navToggleItem && menuFocus !== navMenuLinks[0]) {
23        document.querySelectorAll('.main-navigation > ul > li')[navLastParent].querySelector('a').focus();
24    }
25    if (menuFocus === menuToggle) {
26        navToggleItem = true;
27    } else {
28        navToggleItem = false;
29    }
30}, true);
31
32
33document.addEventListener('keydown', function (e) {
34    if (e.shiftKey && e.keyCode == 9) {
35        focusBackward = true;
36    } else {
37        focusBackward = false;
38    }
39});
40
41
42for (el of navMenuLinks) {
43    el.addEventListener('blur', function (e) {
44        if (!focusBackward) {
45            if (e.target === navMenuLinks[nav_lastIndex]) {
46                menuToggle.focus();
47            }
48        }
49    });
50}
51menuToggle.addEventListener('blur', function (e) {
52    if (focusBackward) {
53        navMenuLinks[nav_lastIndex].focus();
54    }
55});
56
57
58});

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.