• Resolved brighton beach

    (@brighton-beach)


    How to make the slider loop

    It seems that the behaviour of the slider is controlled in js > sketch.js > .flex-viewport-wrapper. All properties (from here) I played around with worked fine, except for animationLoop:true, which tells the slider to play the first image immediately after the last one. The original code of sketch.js contains animationLoop:true, but it does not work, not even on the Sketch demo page.

    When I disable .flex-viewport-wrapper, jquery.flexslider.js in the js folder takes over and animationLoop:true does work as expected.

    Is there a way to make it work without erasing parts of the code?
    Could the slider be controlled without changing the original code, using my child theme instead?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Siobhan

    (@siobhyb)

    Hi there,

    In order to get this to work with your child theme, you’ll first need to dequeue the parent’s theme FlexSlider script and then enqueue your new child theme’s script.

    My colleague, Kathryn, previously helped someone with specific code on how to do this here:

    https://wordpress.org/support/topic/make-the-flex-slider-run-automatic

    Can you take a look over that thread to see if it helps you out? Feel free to post back here if questions come up.

    Thread Starter brighton beach

    (@brighton-beach)

    Thanks again for your help, Siobhan.
    I will look into dequeuing and enqueuing.

    Thread Starter brighton beach

    (@brighton-beach)

    Works fine now. I can control the slider from my child theme.
    Thank you very much for the tip.

    Siobhan

    (@siobhyb)

    I’m so glad you got it working. 🙂 You know where to find us if extra questions come up too.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘How to make the slider loop’ is closed to new replies.