Streaming live at 10am (PST)

Slider random start


#1

Couldn t find a easy help for a random slider.

Would also already help just to have a random slide start, so that everytime you come to the site, there is an other slide.

Thank you,
Lucas


Here is my public share link: LINK
(how to access public share link)


#2

You dont have this option “build-in” in the slider.

Try this (you must add some JS code “before body tag”):

If this wont work ask again


#3

Thank you , I looked at this. But it was not clear where i have to paste the script, and if i have to give IDs to the slides, or slider or mask?

Best,
Lucas


#4

follow one to one this example (click on “open in webflow” button)

(create new slider to learn this topic. And thats it)

<script>
  $(".mask").append($(".mask").children().sort(function () {
    return Math.random() - 0.5;
}));
</script>

$(".mask) This is the jquery selector (class selector) so add to your mask this class (+ remember to put this code "Before </body> tag (under gear icon next to the page name)

how-to-add-custom-head-and-body-code-to-a-webflow-site:


#5

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.