DEV Community

hindrik40
hindrik40

Posted on

Stuck among slides

`
//föra bilderna fram och tillbaka

//Funktion för att aktivera bildspelet

function runSlideshow(){
let intervalId = setInterval(function () {
//Alla bilderna
let slideshowImages = document.querySelectorAll("#slideshow img");
//Sista bilden
let lastImage = slideshowImages[slideshowImages.length-1];
console.log("Tona ut bilden", lastImage);
let opacity =1;
let fadeOutId = setInterval(function () {
lastImage.style.opacity = opacity;
if (opacity>0) {
opacity-=0.01;
} else {
clearInterval(fadeOutId);
opacity = 1;
}
},1000/60);
},5000);
return intervalId;
function FadeOut(moveImage){
image.style
}

};
runSlideshow();
runFadeout();
runMoveImage();

function moveImage(image){
image.remove();
slideshow.prepend(image);
};
Stuck again I can't get my slideshow to go around It doesn't fade correctly and all three pics don't rotate. Any suggestion?? I do have text to my slides but the text doesn't fade away either.
`

Top comments (0)