PageSourceSearch

https://www.foodcoldchain.org/wp-content/themes/enigma/js/menu.js?ver=1

js foodcoldchain.org collected 2026-10-02 10:40:09 UTC 1,813 bytes, 62 lines download raw bytes

1jQuery(document).ready(function() {
2	"use strict";
3	jQuery('li.dropdown').find('.fa-angle-down').each(function(){
4		jQuery(this).on('click', function(){
5			if( jQuery(window).width() < 767) {
6				jQuery(this).parent().next().slideToggle();
7			}
8			return false;
9		});
10	});
11});
12
13jQuery(document).ready(function() {
14          jQuery(".navbar").accessibleDropDown();
15      });
16
17      jQuery.fn.accessibleDropDown = function () {
18        var el = jQuery(this);
19
20        /* Make dropdown menus keyboard accessible */
21
22          jQuery("a", el).focus(function() {
23              jQuery(this).parents("li").addClass("focus");
24          }).blur(function() {
25              jQuery(this).parents("li").removeClass("focus");
26          });
27      }
28
29
30function enigma_toggle_icon_burger() {
31
32    const list = document.querySelectorAll(".nav-menu li a");
33
34    // get first element to be focused inside modal
35    const firstFocusableElement = document.getElementById('nav-tog');
36
37    // get last element to be focused inside modal
38    const last = list[list.length - 1];
39    const lastFocusableElement = last;
40
41    document.addEventListener('keydown', function (e) {
42        let isTabPressed = e.key === 'Tab' || e.keyCode === 9;
43
44        if (!isTabPressed) {
45            return;
46        }
47
48        // if shift key pressed for shift + tab combination
49        if (e.shiftKey) {
50            if (document.activeElement === firstFocusableElement) {
51                lastFocusableElement.focus();
52                e.preventDefault();
53            }
54        } else {
55            if (document.activeElement === lastFocusableElement) {
56                firstFocusableElement.focus();
57                e.preventDefault();
58            }
59        }
60    });
61}
62enigma_toggle_icon_burger();

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.