Search code examples
sliderjssor

Is it possible to start JSSOR slider with a different slide on a page refresh?


I would like the slider to start at a different position every time the web page is loaded. I would not like to see the same first image every time the web page is loaded. Is this possible?


Solution

  • var startIndex = Math.floor(Math.random() * 4); //Assuming that you have 4 slides in your slider
    
    var options = {
        ...,
        $StartIndex: startIndex,
        ...
    };