Jump to content
Search Community

Swipe images on ipad

Jophine test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi I'm not exactly sure what you want to achieve. Swipe.js has a lot built it into to detect swipe actions, allow for continuous swipes, use CSS3 transitions for modern browsers and fallbacks for older browsers and number of other features. You could certainly dig into their source and change the animation-related code to use a TweenMax tween, but I'm really not sure there would be any noticeable benefit. Honestly it seems like they have a real solid product there, I wouldn't advise tinkering with it. I think trying to duplicate would also be fairly ambitious.

 

A super-simplified approach would be:

if(swipeDirection == "left"){ 
  TweenLite.to(element, 1, {left:"-=250px"});
} else { 
    TweenLite.to(element, 1, {left:"+=250px"});}
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...