woocommerce / FlexSlider

An awesome, fully responsive jQuery slider plugin
http://www.woocommerce.com/flexslider/
GNU General Public License v2.0
4.91k stars 1.69k forks source link

FlexSlider length attribute doesn't work (defaults to 2?!) #1782

Closed crazyserb closed 2 months ago

crazyserb commented 4 years ago

I'm trying to create "FIRST" and "LAST" links for the slider (to go to the beginning and end of the slide), and for the "FIRST" value, a simple

flexsliderMain.flexslider(0);

does the trick.

But for "LAST" link, when I try something like this doesn't work, and just returns "2" (attributes.length that is), no matter what (whether I have 10 slides or 200):

flexsliderMain.flexslider( flexsliderMain[0].attributes.length );

and it just ends advancing the slide to the next set of slides, instead of forwarding it all the way to the end.

What am I missing?!