From c9953a4e3b5448354a530472eb6361c5ca364170 Mon Sep 17 00:00:00 2001 From: paulusr1 Date: Fri, 15 Nov 2024 12:05:15 +0100 Subject: [PATCH] script.js aktualisiert Make sure Carousel does not block links when disabled. --- script.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/script.js b/script.js index 4b55ca2..7769eb7 100644 --- a/script.js +++ b/script.js @@ -244,6 +244,7 @@ const updateCarousel = function(slides, posts) { const showCarousel = function() { // show popover document.getElementById('popover').style.opacity = '1'; + document.getElementById('popover').style.display = 'block'; // Activate Carousel $('#myCarousel').carousel("cycle"); } @@ -254,8 +255,8 @@ const strip = function(html) { } const hideCarousel = function() { - // show popover - document.getElementById('popover').style.opacity = '0'; + // hide popover + document.getElementById('popover').style.display = 'none'; // Activate Carousel } @@ -360,8 +361,9 @@ $(document).ready(async function() { if ( withCarousel) { updateCarousel(slides, allPosts.flat()); - setTimeout(async function() { showCarousel(); }, duration) + setTimeout(async function() { showCarousel(); }, duration); } + else setTimeout(async function() { hideCarousel(); }, duration); setInterval(async function() { const newPosts = await Promise.all(hashtagsArray.map(hashtag => fetchPosts(serverUrl, hashtag))); let updated = updateWall(newPosts.flat()); -- 2.39.5