How to program a button that skips to a specific slide in a slider presentation?

Has anyone managed to skip a slide in a slider somehow?

To make it simple lets say that you in slide 2 has a button that says ''Take me to slide 4''. Then it would remove slide 3 totally.

Tried multiple approach in custom code, but hasnt figured out a solution yet

Comments

2 comments

  • Comment author
    A J

    Hey Daniel Bøllingtoft, I was trying out various methods in custom code and did not find much luck.However, I was testing this approach and modified few things in the custom code and it seems to work on my end.

    <script>
     $(document).ready(function() {
        // go to slide 4
        $('#REPLACE-YOUR-BUTTON-ID-HERE').click(function(e) {
            e.preventDefault();
            $('div.w-round div:nth-child(4)').trigger('tap');
        });
    });
    </script>
    

    Make sure to replace the REPLACE-YOUR-BUTTON-ID-HERE with the actual ID of the button you have in the slide 2. That being said, I am not sure if this is feasible in long run, but as of now it does seem to work. Hope this helps.

    0
  • Comment author
    Daniel Bøllingtoft

    Thank you so much for the input! I will try to test it 😄

    0

Please sign in to leave a comment.