Streaming live at 10am (PST)

Custom code to set the default starting slide to slide 2


Hi all,

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.



Thanks Graham

Here is my site Read-Only: LINK
(how to share your site Read-Only link)


Hello @allthingsGJD

Can you try using the script bellow

$(document).ready(function() {
    $('#sliderId div:nth-child(slideNumber)').trigger('tap');

Paste the code before the closing body tag

Hope this helps

Piter :webflow_heart:


Hi Piter,
Thanks for taking the time to jump in.

I am a none coder, as such I understand the process of adding the code to the body tag, however I do not understand the use of the script.

Do I need to apply an iD to the slider?
Do I need to identify slide 2?

If you could expand on how to use it, that would be great.

Thanks Graham


No problem!

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.

See screen record >

Piter :webflow_heart:


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?

Thanks Graham