Hey. Vi har skrivit vårt namn som en pumpa på en zip hoodie och en t-shirt. Kärlek, Boom Detaljer Illustration av Rasmus Due. Sommerfuglelogo av Aldo Zocca. /* SLIDE UP */ let slideUp = (target, duration=500) => { target.style.transitionProperty = ’height, margin, padding’; target.style.transitionDuration = duration + ’ms’; target.style.boxSizing = ’border-box’; target.style.height = target.offsetHeight + ’px’; target.offsetHeight; target.style.overflow = ’hidden’; target.style.height = 0; target.style.paddingTop = 0; target.style.paddingBottom = 0; target.style.marginTop = 0; target.style.marginBottom = 0; window.setTimeout( () => { target.style.display = ’none’; target.style.removeProperty(’height’); target.style.removeProperty(’padding-top’); target.style.removeProperty(’padding-bottom’); target.style.removeProperty(’margin-top’); target.style.removeProperty(’margin-bottom’); target.style.removeProperty(’overflow’); target.style.removeProperty(’transition-duration’); target.style.removeProperty(’transition-property’); //alert(”!”); }, duration); } /* SLIDE DOWN */ let slideDown = (target, duration=500) => { target.style.removeProperty(’display’); let display = window.getComputedStyle(target).display; if (display === ’none’) display = ’block’; target.style.display = display; let height = target.offsetHeight; target.style.overflow = ’hidden’; target.style.height = 0; target.style.paddingTop = 0; target.style.paddingBottom = 0; target.style.marginTop = 0; target.style.marginBottom = 0; target.offsetHeight; target.style.boxSizing = ’border-box’; target.style.transitionProperty = ”height, margin, padding”; target.style.transitionDuration = duration + ’ms’; target.style.height = height + ’px’; target.style.removeProperty(’padding-top’); target.style.removeProperty(’padding-bottom’); target.style.removeProperty(’margin-top’); target.style.removeProperty(’margin-bottom’); window.setTimeout( () => { target.style.removeProperty(’height’); target.style.removeProperty(’overflow’); target.style.removeProperty(’transition-duration’); target.style.removeProperty(’transition-property’); }, duration); } /* TOOGLE */ var slideToggle = (target, duration = 500) => { if (window.getComputedStyle(target).display === ’none’) { return slideDown(target, duration); } else { return slideUp(target, duration); } } var acc = document.getElementsByClassName(”accordion”); var i; for (i = 0; i < acc.length; i++) { slideUp(acc[i].nextElementSibling, 0); acc[i].addEventListener("click", function() { var panel = this.nextElementSibling; slideToggle(panel, 400); var img = this.querySelectorAll("img"); if (img[1].style.display === "block") { img[1].style.display = "none"; img[2].style.display = "block"; } else { img[1].style.display = "block"; img[2].style.display = "none"; }; }); }