1// script for TOP LOCATIONS LIST TO DROPDOWN 2var activeClass = "is-active" 3var forEach = function (array, callback, scope) { 4 for (var i = 0; i < array.length; i++) { 5 callback.call(scope, i, array[i]); // passes back stuff we need from the array 6 } 7}; 8forEach(document.querySelectorAll(".dropdown_list span.dropdown"), function (index, value) { 9 value.addEventListener('click', function () { 10 //console.log(value.classList); 11 if (!value.classList.contains(activeClass)) { 12 var el = document.querySelectorAll(".dropdown_list span.dropdown"); 13 var i; 14 for (i = 0; i < el.length; i++) { 15 // el[i].classList.remove(activeClass); 16 } 17 value.classList.toggle(activeClass); 18 } else 19 if (value.classList.contains(activeClass)) { 20 value.classList.remove(activeClass); 21 } 22 }) 23}); 24// document.addEventListener('click', function (e) { 25// // Dropdown Select Toggle 26// var el = document.querySelectorAll(".dropdown_list span.dropdown") 27// var e = e ? e : window.event; 28// var event_element = e.target ? e.target : e.srcElement; 29// if (!event_element.closest(".dropdown_list")) { 30// //console.log(event_element.closest(".dropdown_list")); 31// var i; 32// for (i = 0; i < el.length; i++) { 33// el[i].classList.remove(activeClass); 34// } 35// } 36// }, false);
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.