Changes

Jump to navigation Jump to search
2,617 bytes added ,  10:11, 25 August 2020
no edit summary
/* Any JavaScript here will be loaded for all users on every page load. Javascript filter---------------------------------*/
// animate divs on startvar items = document.querySelectorAll('.filter-sections li');animate(items); // filter on clickeach('.filter-links li', function(el) { el.addEventListener('click', function(e) { e.preventDefault(); filterLinks(el); });}); // filter links functionsfunctionfilterLinks(element) { // get text var s el = element.textContent, // convert to lowercase// linksTolowerCase = el.toLowerCase(); linksTolowerCase = el; // if all remove all elements if (el === 'All') { // first show all view class each('.view', function(e) { e.classList.remove('view'); }); // no show init animation animate(items); } else { // if not click all remove all elements each('.view', function(e) { e.classList.remove('view'); }); } // show animation for current elements animate(document.createElementquerySelectorAll('script.'+ linksTolowerCase));};// forech arraysfunction each(el, t callback) { var allDivs = document.getElementsByTagNamequerySelectorAll(el), alltoArr = Array.prototype.slice.call(allDivs); Array.prototype.forEach.call(alltoArr, function(selector, index) { if (callback) return callback(selector); });};// animate functionfunction animate(item) { (function show(counter) { setTimeout(function() { item[counter].classList.add('scriptview')[; counter++; if (counter < item.length) show(counter); },2); })(0]);}sfunction openForm(evt, formName) { // Declare all variables var i, tabcontent, tablinks; evt.type preventDefault();  // Get all elements with class= 'text"tabcontent" and hide them //javascript'tabcontent = document.getElementsByClassName("contextxmlform"); s //for (i = 0; i < tabcontent.async = truelength;i++) { s // tabcontent[i].style.src display = 'http:"none"; //}  //apiShow the current tab, and add an "active" class to the link that opened the tab if (evt.currentTarget.className.includes(' active')) { evt.flattrcurrentTarget.comclassName.replace(" active", ""); /js/Get all elements with class="tablinks" and remove the class "active" tablinks = document.getElementsByClassName("tablinks"); for (i = 0; i < tablinks.6length; i++) { tablinks[i].className = tablinks[i].className.replace(" active", ""); } document.getElementById(formName).style.display = "none"; } else { /load/ Get all elements with class="tablinks" and remove the class "active" tablinks = document.js?modegetElementsByClassName("tablinks"); for (i =auto'0; i < tablinks.length;i++) { t tablinks[i].className = tablinks[i].parentNodeclassName.insertBeforereplace(s" active", t""); }) document.getElementById(formName).style.display = "block"; evt.currentTarget.className += " active"; } }

Navigation menu