Jump to content
Search Community

alx

Members
  • Posts

    4
  • Joined

  • Last visited

alx's Achievements

  1. Yeah mvaneijgen.....that helped! That was it! Next time, instead of spending 2 days trying to fix it myself, I'll just post on the forum😆. I really appreciate the fix and explanation. Here's how I applied it (the last section of code) to the actual project... $("#menu-main-menu a").click(function(event){ event.preventDefault(); let destination = $(this).attr("href"); tl.tweenTo(0, { onComplete: () => { window.location = destination; } }) }); So now the browser successfully waits for the reversed menu animation to finish, and then refreshes the window with the new page. Thanks again!!!
  2. Greetings! To replicate my problem, I created this simple codepen. I can't figure it out😵. All I want is: click on the 'link' -> menu animation reverses -> 'container' turns red. This is where the onComplete comes in; the sequence is important for just one reason, the 'container' turning red is actually going to be the destination of the link or simply speaking, the window.location. Basically, the menu will close like it opened and then the browser can refresh...but because I can't get the onComplete to work, the brower refreshes while truncating the animation.
  3. wow! yeah that's it. i would've never figured that out on my own. thanks greensock!
  4. Greetings! I can't find how to set up this code. To be a bit more efficient, how do you tell it to simply trigger on each individual div? I hope that's clear enough...
×
×
  • Create New...