How do I stop auto sliding in my flexslider?
Asked Answered
W

1

19

How to stop auto sliding in a flex slider? I have loaded that slider in my mobile web page. When the page is opened, it slides to the next image without any slide or tap event. How to stop this auto slide transition? I need to make it working only when a screen is tapped or slided.

Here is my code:

<script type="text/javascript" charset="utf-8">
    $(window).load(function() {
        $('.flexslider').flexslider();
    });
</script>

<div class="flexslider">
    <ul class="slides">
        <li>
            <img src="img1.png"/>
        </li>
        <li>
            <img src="img2.png"/>
        </li>
    </ul>
</div>
Whence answered 13/2, 2013 at 8:12 Comment(0)
S
68

By default Flexslider has value slideshow: true so you have to change the value to false.

$(window).load(function() {
  $('.flexslider').flexslider({
    slideshow: false
  });
});
Sunny answered 15/2, 2013 at 6:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.