Next and Previous Slider Button

Asked

Viewed 27 times

0

I have this code, where the slide automatically passes ahead as the timer set. How can I implement a Next and Previous button?

$("#image-vitrine > div:gt(0)").hide();

setInterval(function slideVitrine() {
    $('#image-vitrine > div:first')
        .fadeOut(1000)
        .hide()
        .next()
        .fadeIn(1000)
        .end()
        .appendTo('#image-vitrine');
}, 6500);
  • In my view, you could use this same code, separating it into a function and just as you call in setInterval, you could call by executing the button click, wouldn’t that be feasible? If you want to put more code information so that I can guide you better...

  • Luis, the only more information is html. Has the div #image-showcase and below it another div with <img>

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.