metafizzy / flickity

:leaves: Touch, responsive, flickable carousels
https://flickity.metafizzy.co
7.53k stars 602 forks source link

flickity tries to use jQuery Deferred function even if jQuery doesn't support it #846

Closed ghost closed 6 years ago

ghost commented 6 years ago

Consider a legacy website where jQuery 1.4.4 is loaded before flickity. Using imagesLoaded: true option results in error Uncaught TypeError: $.Deferred is not a constructor as flickity finds $ and does not check if Deferred function is available. Would be nice if flickity did additional check to see if Deferred function is actually available or even option to force disable jQuery usage.

Test case: https://codepen.io/anon/pen/GYJvGb

desandro commented 6 years ago

Thanks for reporting this issue. See discussion at desandro/imagesloaded#257