malsup / cycle2

2nd gen cycling
899 stars 239 forks source link

I can't turn off the autoplay #858

Open spip93 opened 3 years ago

spip93 commented 3 years ago

Hello,

I would like to disable the slideshow autoplay on this page: https://www.bm-aubenas.fr/nouveautes I followed the instructions you gave on this issue: https://github.com/malsup/cycle2/issues/183 Using data-cycle-timeout = 0

From what I understood, you have to add this attribute to the div which has the "slideshow" class

Searching the page, I found this: <div class = "slideshow fx-carousel fx-carousel-233882-32" style = "position: relative; overflow: hidden;">

Unable to edit the HTML, I went through the following JS command: document.getElementsByClassName ('slideshow') [0] .setAttribute ("data-cycle-timeout", 0);

That added me well data-cycle-timeout = "0" (and not data-cycle-timeout = 0) (oddly only on the first slide show), but it does not work; the slideshow (s) continue to scroll.

Would you please know which line (s) of JS code to load to disable autoplay on all slideshows on the page?

Thank you in advance for your response. Have a good day.