Jump to content
Search Community

Right and left

Guest
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 have a little problem with right and left. When I click on the button 'inscription' everything is ok. But, when I click  on 'logIn' it doesn't work. Indeed, Left still has '0' and right has also '0'. Then, nothing happens. I've tried with t1.fromTo(.img, 0.35, {left : 0}, {right:0}), but it doesn't work. 

Can you help me to understand why 'left 'still has 0 when I click on 'logIn'  ?

Thanks :). 

inscription.addEventListener('click', () =>{
    t1.to(img, 0.35, {borderBottomLeftRadius:'200px 400px',borderBottomRightRadius:'0px', borderTopRightRadius:'0px',borderTopLeftRadius:'200px 400px', left: 0, strictUnits:true});
    t1.to(form, 0.35, {right:'8%', zIndex:1, strictUnits:true}, '-=0.35');
    t1.to(form,0.35, {opacity: 1}, '-=0.20');
});

logIn.addEventListener('click', () => {
    t1.to(img, 0.35, {borderBottomLeftRadius:'0px',borderBottomRightRadius:'200px 400px', borderTopRightRadius:'200px 400px',borderTopLeftRadius:'0px', right: 0, strictUnits:true});
    t1.to(form,0.35, {opacity: 0}, '-=0.20');
});

 

See the Pen RwbmXZW by tedtech7 (@tedtech7) on CodePen

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