diff --git a/script.js b/script.js index 7769eb7..4b55ca2 100644 --- a/script.js +++ b/script.js @@ -244,7 +244,6 @@ 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"); } @@ -255,8 +254,8 @@ const strip = function(html) { } const hideCarousel = function() { - // hide popover - document.getElementById('popover').style.display = 'none'; + // show popover + document.getElementById('popover').style.opacity = '0'; // Activate Carousel } @@ -361,9 +360,8 @@ $(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());