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

Not working with latest jquery #1729

Closed ihaiderx closed 6 years ago

ihaiderx commented 6 years ago

The slider does not display with jQuery 3.1.0 that my website has built into it. It does work when I add jQuery 1.6.2, but I'd prefer not to load two jQuerys on my website. Thank you!

gkirthiv commented 6 years ago

hi ihaiderx,

can you try with document.ready instead of window.load?

thanks

andreyshr commented 6 years ago

I have hit the same bug. The solution from the document.ready fixed it. Thanks!

ihaiderx commented 6 years ago

I'm still having the same issue even after using document.ready, but I think that has to do with the fact that the built-in jQuery in my Shopify theme is being called with 'async' or 'defer'. Is there a way to make flexslider work with a async or deferred jQuery?

gkirthiv commented 6 years ago

if you use 'defer', call the 'flexslider' by using setTimeout(). Also use 'defer' in your flexslider like, <script defer src="../jquery.flexslider.js"></script>.