OneCompiler

Image slide.

161

This is javascript codes that explains how you can make an images slide.

You can have a look of it and figureout.

Have fun!

const photoes = ['call.png','drop.png','file.png','logo.png','menu.png','message.png']
let slide = document.getElementById('image')
let i = 0
function moveFore(){
    slide.src = photoes[i]
    i++
    if (i == photoes.length){
        i = 0
    }
}

function moveBack(){
    i--
    slide.src = photoes[i]
}
setInterval(moveFore, 1000)