Streaming live at 10am (PST)

Slider swipe and autoplay on mobile

Can you set a slider to play automatically on mobile but NOT on desktop?


Here is my site Read-Only:

Here is the published site:

For now only by custom code. Set autoplay to true (On webflow designer) and set data-autoplay (Js attribute) to false (0) by custom code.

Copy-Paste this code before body (Under page setting).
** This code stop all sliders on the page.

	/* if screen width is more than 767px */
  if (window.innerWidth > 767) {

  function stopSliderAutoPlay() {
    var slider, i;
    slider = document.querySelectorAll(".w-slider");
    for (i = 0; i < slider.length; i++) {
    	/* stop webflow slider autoplay */ 
      slider[i].setAttribute("data-autoplay", "0");

Result: Autoplay on mobile only.

1 Like

Worked like a charm. Thank you very much!