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 .

13 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

  6. Producer says:

    that may be the finish of this write-up. Right here you will discover some web-sites that we think youll enjoy, just click the hyperlinks over

  7. that may be the finish of this write-up. Right here you will locate some web-sites that we feel youll value, just click the links over

  8. we like to honor lots of other web sites around the web, even when they arent linked to us, by linking to them. Below are some webpages worth checking out

  9. that could be the finish of this report. Right here you will discover some web pages that we think youll enjoy, just click the hyperlinks over

  10. we prefer to honor numerous other web websites around the web, even when they arent linked to us, by linking to them. Beneath are some webpages really worth checking out

  11. we like to honor several other net websites around the net, even though they arent linked to us, by linking to them. Underneath are some webpages really worth checking out

  12. we like to honor several other net internet sites on the web, even when they arent linked to us, by linking to them. Below are some webpages worth checking out

  13. that could be the finish of this article. Here you will find some internet sites that we feel youll value, just click the hyperlinks over

What Are Your Thoughts?

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