How do I manually jump to a specific slide in Flexslider?

Sarah Berg

This is such a quick fix, yet very few places on the internet seem to know the 4 lined solution to this problem. If you are using the FlexSlider plugin, you may come across the scenario where you need to jump to a specific slide – no animations attatched. Just a good old fashioned goTo action.  I found that while my other search terms failed, looking for changing the flexslider settings after initialization had something to it.

This is how i initialized my flexslider:

$('#whyslider').flexslider({
	animation: "slide",
	slideshow: false,
	animationLoop:true
});

Later in the code when i wanted to jump to a slide:

var slider = $('#whyslider').data('flexslider');
var animationSpeed = slider.vars.animationSpeed; 	//save animation speed to reset later
slider.vars.animationSpeed = 0;
slider.flexAnimate(3); 					//position index for desired slide goes here
slider.vars.animationSpeed = animationSpeed;

Source

Last updated by on .

5 thoughts on "How do I manually jump to a specific slide in Flexslider?"

  1. Sergej says:

    Thanks for this solving!)

  2. It does not stay at the linked slide. It jumps back to first one right away.

  3. Tim Barsness says:

    Have you tried disabling autoplay?

  4. stalik says:

    below youll find the link to some websites that we consider you need to visit

  5. that would be the finish of this write-up. Right here you will find some web-sites that we think youll appreciate, just click the hyperlinks over

What Are Your Thoughts?

Your email address will not be published. Required fields are marked *