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

.flex-active-slide applied to incorrect slide when using 'reverse' option #1624

Closed anakadote closed 2 months ago

anakadote commented 7 years ago

Simple to test, just set the 'reverse' config option to 'true' and then then 'flex-active-slide' class will no longer be applied to the correct/current slide. This in turn causes the 'smoothHeight' functionality to not work correctly as well.

anakadote commented 7 years ago

A workaround to the smoothHeight issue is to apply this functionality manually in the 'after' callback:

reverse: true,
smoothHeight: false,
after: function(slider) {
    var curSlide = slider.find('.slide').eq(slider.currentSlide);
    slider.find('.flex-viewport').height(curSlide.height());
}