script.js aktualisiert
Make sure Carousel does not block links when disabled.
This commit is contained in:
parent
f52d2d2c25
commit
c9953a4e3b
1 changed files with 5 additions and 3 deletions
|
@ -244,6 +244,7 @@ const updateCarousel = function(slides, posts) {
|
||||||
const showCarousel = function() {
|
const showCarousel = function() {
|
||||||
// show popover
|
// show popover
|
||||||
document.getElementById('popover').style.opacity = '1';
|
document.getElementById('popover').style.opacity = '1';
|
||||||
|
document.getElementById('popover').style.display = 'block';
|
||||||
// Activate Carousel
|
// Activate Carousel
|
||||||
$('#myCarousel').carousel("cycle");
|
$('#myCarousel').carousel("cycle");
|
||||||
}
|
}
|
||||||
|
@ -254,8 +255,8 @@ const strip = function(html) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const hideCarousel = function() {
|
const hideCarousel = function() {
|
||||||
// show popover
|
// hide popover
|
||||||
document.getElementById('popover').style.opacity = '0';
|
document.getElementById('popover').style.display = 'none';
|
||||||
// Activate Carousel
|
// Activate Carousel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -360,8 +361,9 @@ $(document).ready(async function() {
|
||||||
|
|
||||||
if ( withCarousel) {
|
if ( withCarousel) {
|
||||||
updateCarousel(slides, allPosts.flat());
|
updateCarousel(slides, allPosts.flat());
|
||||||
setTimeout(async function() { showCarousel(); }, duration)
|
setTimeout(async function() { showCarousel(); }, duration);
|
||||||
}
|
}
|
||||||
|
else setTimeout(async function() { hideCarousel(); }, duration);
|
||||||
setInterval(async function() {
|
setInterval(async function() {
|
||||||
const newPosts = await Promise.all(hashtagsArray.map(hashtag => fetchPosts(serverUrl, hashtag)));
|
const newPosts = await Promise.all(hashtagsArray.map(hashtag => fetchPosts(serverUrl, hashtag)));
|
||||||
let updated = updateWall(newPosts.flat());
|
let updated = updateWall(newPosts.flat());
|
||||||
|
|
Loading…
Reference in a new issue