malsup / cycle2

2nd gen cycling
899 stars 236 forks source link

hasOwnProperty is not a function using jQuery 4.0.0 #867

Open BackuPs opened 3 weeks ago

BackuPs commented 3 weeks ago

When using the cycle sliderwith jquery 4.0 it creates this error data.hasOwnProperty is not a function

It is probably caused because query 4.0? has removed .pusg .sort & .splice

How to fix these issues with jquery 4.0?

Any guidance or solution?

is this js still supported?

BackuPs commented 3 weeks ago

The solution is here. https://stackoverflow.com/questions/78910988/jquery-4-0-data-hasownproperty-is-not-a-function

change 2 lines in the js file

     `data = $.extend({}, container.data() || {});`

     `var slideOpts = $.extend({}, slide.data() || {} );`