Jump to content
Search Community

pause onclick

lynette test
Moderator Tag

Go to solution Solved by Carl,

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, 

 

Is there a way to add an pause onclick?

 

 Here is my code: 

 

 var $container = $("#container"),
            $content = $("#content"),
            $bg = ("#bg"),
            $panel1 = ("#panel1"),
            $panel2 = ("#panel2"),
            $panel3 = ("#panel3"),
            $line1 = ("#line-1"),
            $line2 = ("#line-2"),
            $line3 = ("#line-3"),
            $line4 = ("#line-4"),
            $btn = ("#btn"),
            $exit = ("#exit"),
            tl;
 
       var tl = new TimelineMax({repeat:2})
        
        tl.from($line1, 1, {opacity:0},"+=2.25")
          .to($line1, 0.5, {opacity:0})
          .from($line2, 2, {opacity:0})
          .to($line2, 0.85, {opacity:0})
          .from($line3, 2, {opacity:0}, "go")
          .from($line4, 2, {opacity:0}, "go")
          .from($btn, 2, {opacity:0}, "go")
 
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...