woocommerce / FlexSlider

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

binding error resize method line 148 #1690

Closed juergen-venne closed 6 years ago

juergen-venne commented 6 years ago

Method resize is not called when resizing the window. Looks like there is an error binding the method to the events in line 148: if (!fade || (fade && slider.vars.smoothHeight)) { $(window).bind("resize orientationchange focus", methods.resize()); }

The function must be handed over as reference and not be called: if (!fade || (fade && slider.vars.smoothHeight)) { $(window).bind("resize orientationchange focus", methods.resize); } Please note the missing () after methods.resize.

juergen-venne commented 6 years ago

I just saw that this issue is handled excellent here:i https://github.com/woocommerce/FlexSlider/pull/1686