1// vanilla accordion script. no jquery, dependencies. 2var jsaccordion = { 3 init : function (target) { 4 // initialize the accordion 5 var headers = document.querySelectorAll("#" + target + " .toggle-control"); 6 if (headers.length > 0) { for (var head of headers) { 7 head.addEventListener("click", jsaccordion.select); 8 }} 9 }, 10 select : function () { 11 // fired when user clicks on a header 12 var contents = this.nextElementSibling; 13 contents.classList.toggle("open"); 14 var contents = this; 15 contents.classList.toggle("open"); 16 } 17}; 18// runs on page load 19window.addEventListener('load', function(){ 20 jsaccordion.init("toggle-container"); 21});
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.