I have made a custom slider that shows the previous and next slides ghosted out, I would like to set the default starting slide to slide 2, that way the left previous slide is visible.
Does anyone out there have any custom code to override the defaults?
I cannot share the read only link, it is confidential, the question basically applies to any Webflow slider.
I have attached images of the default starting position and the preferred position.
Click on the slider element and add an ID > for example #myslide > add the script to the closing body tag > change the #sliderId with the ID of your slider > specify the slide number you want to be active on load.
Thanks Piter, sorry I still do not understand which part I change (or add) to specify the slide number, do it replace the (slideNumber) part or do I add the number somewhere else?
I added the code to the custom code section bevore and gave the main slider element the id which i also inserted in the javascript. Do I need further adaptions to do?
Hi, I’d like to do something like this and wonder if you could help me. I’d like to know if it is possible to set the first slide as default once the mouse is out of the slider. I mean, that if i’m over the slide and go through the slides and stop at slide 3, when I move out the slider the slides go back to the begin. There’s the logic of how to do it in my head but not sure when it comes with the code
I’d much appreciate any kind of help or hints on it
@PeterDimitrov I have vanilla javascript on my website. Would you be able to help me convert it to normal javascript so that I can use this solution please? Also, because it is on page load, should it go on top of all of my other javascript? Thank you!
I’ve added a component lib to SA5 that allows you to manipulate the Webflow slider- navigate to any slide by number, or navigate to first, next, prev, last slides. It also support a callback for events whenever the slide changes even if it’s auto-changed.