You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It basically involves using an animation library (VelocityJS) to fade the slide on Swipe callback.
Using CSS transitions is tricky, because Swipe itself already uses CSS transitions to fade the library in-out.
My example
window.mySwipe=newSwipe(mySwipeElem,{callback: function(index,elem,dir){_resetImageOpacity();// Make all slides fully transparent (`opacity: 0`)
callback: function(index,elem,dir){elem.querySelector('figure').style.opacity='0';// Indicate that we changed slidechangedSlide=true;},transitionEnd: function(index,elem){_resetImageOpacity();// Make sure we only run the transition on slide changeif(changedSlide){velocity(elem.querySelector('figure'),{opacity: [1,0]});}// Reset the `changedSlide` flag once transition is completechangedSlide=false;}});
Hi, hm, looks great. Thanks for getting back to this and for the example. I'm still using Swipe wherever I can :), it's really great, and using VelocityJS is a nice solution.
Besides slide's
move
transition it would be great to have afade
transition option.The text was updated successfully, but these errors were encountered: