How to trigger a "next" slider arrow button with javascript?

Hello,

I would like to know how one could trigger a native webflow slider “next” button arrow with vanilla javascript ?


Here is my site Read-Only: LINK
(how to share your site Read-Only link)

Hey @anthonysalamin
How do you want to trigger the next button? on scroll? or by clicking other button/element?

Thank you @Pablo_Cortes , I found it myself. I wanted to trigger on button click:

document.addEventListener("DOMContentLoaded", () => {
  const btnNext = document.getElementById("btn-next");
  setTimeout(function () {
    btnNext.click();
  }, 200);
});
2 Likes