zurb / twentytwenty

jQuery Plugin to Compare Images
ISC License
1.27k stars 294 forks source link

Why the swipe not working with CDNs (Maybe the version not update?) #98

Closed Ezra-Siton-UIX closed 6 years ago

Ezra-Siton-UIX commented 6 years ago

Swipe issue with jquery.twentytwenty.js file (see the codepens):

Working swipe :)

When i use this assest from this page the swipe works fine :

<script src="https://zurb.com/playground/uploads/upload/upload/91/jquery.event.move.js"></script>
<script src="https://zurb.com/playground/uploads/upload/upload/92/jquery.twentytwenty.js"></script>
 

https://codepen.io/ezra_siton/pen/xJewxp

not working swipe :(

But when i use cdns - the swipe wont work well (Maybe the code inside cloudflare not update) https://cdnjs.com/libraries/mhayes-twentytwenty

<script src="https://cdnjs.cloudflare.com/ajax/libs/mhayes-twentytwenty/1.0.0/js/jquery.event.move.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mhayes-twentytwenty/1.0.0/js/jquery.twentytwenty.min.js"></script>

Example (No swipe): https://codepen.io/ezra_siton/pen/yqrNPy https://codepen.io/brandonhimpfen/pen/ZpOyQx/

Working Example: