Jump to content
Search Community

ZajeliMiGuzik

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by ZajeliMiGuzik

  1. 21 minutes ago, akapowl said:

     

    Hey @ZajeliMiGuzik

     

    If you take all those variables and the setup of the timeline out of that function, just set everything up beforehand, and on click only toglle the (play-)state of your timeline, it seems to work fine. 

     

    Do you really need to have the variables inside that function? ...like, is there dynamic content, that changes with every click, or something and you need to adress that in your timeline somehow? If so, could you please make a minimal demo, of what that exactly looks like?

     

    If not, I hope this already helped :) 

     

     

     

     

     

     

    Cheers,

    Paul


    Hello Paul!
    Now it works perfectly, thanks very much. 

     

    Quote

    Do you really need to have the variables inside that function? ...like, is there dynamic content, that changes with every click, or something and you need to adress that in your timeline somehow? If so, could you please make a minimal demo, of what that exactly looks like?

    I just want to use the same variable names for future timelines. Thats why I'm trying to find a solution like close variables in functions.

     

  2. Hello GreenSock forum!

     

    I have some trouble with setting up my icon animation. If I append variables in local function, my animation start on click but not reverse on another.
    Animation works if I have absolute values (without variables) but I want to have shorter code like currently. When my variables goes into global variables (like in CodePen example) my animation works but have some issues with frames and start glitching / lagging. 

    I would be grateful for some help and examples to try it out.

    See the Pen NWRbYGb by Baracode (@Baracode) on CodePen

  3. On 7/31/2020 at 3:18 PM, ZachSaucier said:

    Hey Zajeli. Please create a minimal demo on CodePen with all extra parts stripped out if you'd like our help debugging. It's pretty hard for us to figure out what's going wrong on a live site that we can't edit ourselves.

     


    Sorry for some late. I'm already updated my post with working CodePen demo.

  4. 33 minutes ago, anshul said:

    It is because you are not animating it (#menuTBar, #menuBBar) back to the original position as when it was freshly loaded, instead it moves slightly downwards in the else part.

    Sure, that was I already notices nad where my question comes from. I don't know the way to store values from start > animate to others > and then backward to stored values.

×
×
  • Create New...