Search code examples
slidersplidejs

SplideJS no arrow, no dots, no pause doesn't work


On this codepen it seems pause on hover can't be false, removing dots and arrows also not! https://codepen.io/rafael-andrews/pen/Vwxvmgg

I tried below but nothing seems to work.

pauseOnHover: 'false',
drag        : 'false',
slideFocus  : 'false',
arrows      : 'false',
pagination  : 'false',

Solution

  • Here you are passing boolean value (false) but in quote so it will work as a string not boolean

    this is wrong

    pauseOnHover: 'false',
    drag        : 'false',
    slideFocus  : 'false',
    arrows      : 'false',
    pagination  : 'false',
    

    use this:

    pauseOnHover: false,
    drag        : false,
    slideFocus  : false,
    arrows      : false,
    pagination  : false,
    

    tried this

    document.addEventListener('DOMContentLoaded', function () {
      new Splide('.splide', {
        type   : 'loop',
        drag   : 'free',
        focus  : 'center',
        pauseOnHover: false,
        drag        : false,
        slideFocus  : false,
        arrows      : false,
        pagination  : false,
        perPage: 3,
        autoScroll: {
          speed: 1,
        },
      }).mount( window.splide.Extensions );
    });