diff --git a/js/info.js b/js/info.js index 0b90200..cb1a92a 100644 --- a/js/info.js +++ b/js/info.js @@ -1,8 +1,26 @@ +function showInfo(id) { + var para = document.getElementById('para7'); + para.style.display = para.style.display === 'block' ? 'none' : 'block'; + } + function showInfo(id) { + var descriptionDiv = document.getElementById('description'); + var para = document.getElementById('para7'); + + if (!para) { + para = document.createElement('p'); + para.id = 'para7'; + para.textContent = 'Listen, you do not know how many times we hear this. The point of the website is just a website refering to the meme Freakybob and just having fun LMAO'; + descriptionDiv.appendChild(para); + } + + para.style.display = para.style.display === 'block' ? 'none' : 'block'; + } let currentIndex = 0; const images = document.querySelectorAll('#image-track img'); const totalImages = images.length; const modal = document.getElementById("image-modal"); const modalImage = document.getElementById("modal-image"); +const descriptionDiv = document.getElementById('description'); function updateCarousel() { const imageTrack = document.getElementById('image-track'); const width = images[0].clientWidth; @@ -23,9 +41,7 @@ function openModal(src) { function closeModal() { modal.style.display = "none"; } -function showInfo() { - const point = "Listen, you do not know how many times we hear this. The point of the website is just freakybob and having fun! Simple." -} + images.forEach(image => { image.addEventListener('click', () => openModal(image.src)); });