1const current = document.querySelector("#current") 2const imgs = document.querySelectorAll(".grid-element img") 3const opacity = 0.7 4 5if (imgs.length) { 6 // Prima immagine con opacità corretta 7 imgs[0].style.opacity = opacity 8 9 imgs.forEach(img => img.addEventListener("click", imgClick)) 10 11 function imgClick(e) { 12 // Reset opacity 13 imgs.forEach(img => (img.style.opacity = 1)) 14 15 // Cambia src 16 current.src = e.target.src 17 18 // Fade in big img 19 current.classList.add("fade-in") 20 21 // Rimozione class .fade-in dopo .3s 22 setTimeout(() => current.classList.remove("fade-in"), 300) 23 24 // Clicked img opacity 25 e.target.style.opacity = opacity 26 } 27}
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.