malsup / cycle2

2nd gen cycling
899 stars 236 forks source link

latest jQuery #824

Open anton100 opened 6 years ago

anton100 commented 6 years ago

Cycle2 behaves erratic with jQuery 3.xx. Downgrading to jQuery 1.12 solves the problem. Is there a fix for using the newest jQuery? Anton

zakgreene commented 6 years ago

Seconded. I'm getting this error sporadically, every other time I load the page:

TypeError: a.indexOf is not a function

My site has a slideshow that takes up most of the page, so the animation improvements in jQuery 3 would be helpful to have.

zakgreene commented 6 years ago

I did some searching and realized it was a very easy fix, so I forked the repo and fixed it. In jQuery 3, .load is removed and needs to be changed to .on('load')

Download here: https://github.com/zakgreene/cycle2/raw/master/build/jquery.cycle2.min.js

anton100 commented 6 years ago

Great Zak, i'm gonna try it.

anton100 commented 6 years ago

Tried the fix with jQuery 3, the 'destroy' and 'reinit' is not working properly. With jQuery 1.12 it's working fine. It's the only function on the page, so why bother...

lorikay4 commented 4 years ago

My security folks won't let me continue to work under an older jquery version, want us to update all to 3.1.4. So I really need a fix for this.

iam-sysop commented 4 years ago

I have a fork here where I've updated several spots to deal with newer jQuery versions - if needed, test and report there - maybe I can help if problem not already resolved.