Jump to content
Search Community

Complete Animation before slider

kram66 test
Moderator Tag

Go to solution Solved by OSUblake,

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

I'm really new to javascript and TweenMax and I'm not really sure if my question is a javascript or tweenmax question, but happy if somebody can put me on the right track.

 

<a href="#" id="info" class="info" onclick="myFunction()">
            <span class="plus"></span> About Me
</a>

 

 

$(document).ready(function(){
    $(".begin").on("click",function(){
       TweenMax.to("#logo",1,{bottom:1200,opacity:0, ease:Back.easeIn},0.5);
    TweenMax.to(".hire",0.6,{left:1000,opacity:0, ease:Back.easeIn},0.2);
    TweenMax.to(".info",1.3,{right:1000,opacity:0, ease:Back.easeIn},0.2);
    TweenMax.to("hr",0.4,{bottom:1000,opacity:0, ease:Back.easeIn},0.2);
    TweenMax.to("#nav-icon1",0.5,{top:1000,opacity:0, ease:Back.easeIn},0.2);
    TweenMax.to("#topright",0.5,{left:1000,opacity:0, ease:Back.easeIn},0.2);
    TweenMax.to(".social",0.5,{left:1000,opacity:0, ease:Back.easeIn},0.2);

 

    //Complete this animation before moving into the slider????

    
    $(".sec-A").addClass("showing");
    $(".head").hide();
    });
    $(".down").on("click",function(){
        $(".head").addClass("head-hide");
    });
    $(".home").on("click",function(){
        $(".side").removeClass("showing");
    });
    $(".code-btn").on("click",function(){
        $(".sec-B").addClass("showing");
    });
    $(".back-btn").on("click",function(){
        $(".sec-B").removeClass("showing");
    });
});

Link to comment
Share on other sites

Something like this?
 

var tween= new TimelineMax({paused:true,onComplete: startSlide}),
    tw1= new TimelineMax(),
    tw2= new TimelineMax(),
    tw3= new TimelineMax();
    
    tw1.to(".box",1, {x: -460});
    tw2.to(".box1",1, {x: 100});
    tw3.to(".box3",1, {bottom: 100});

    tween.add([tw1, tw2, tw3]);

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...