Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

Simple tweens are not working in GSAP.

Go to solution Solved by akapowl,

Recommended Posts


I've been working on a couple of GSAP tweens that will animate the hamburger menu to the right side and add underlines to the navigation links but it's not working properly on the live server.

I'm not entirely sure what's wrong considering my code is almost identical to the instructor that I'm following with. I'd also like to mention that my JS skills are not the best out there and most likely I've done something ridiculously wrong..

An image to the current error in my browser will be attached below. Thanks!



See the Pen BaLWZYo by Ahmad_Mansour (@Ahmad_Mansour) on CodePen

Link to comment
Share on other sites

  • Solution

Hey @Doxx


That error seems to just be related to a typo on your end


    const mainNavLinks = gsap.utils.toArray('.main-nav a');
    mainNavlinks.forEach(link => {


Once your mainNavLinks are written with a capital L and once they are not.


Welcome to the forums :) 


  • Like 3
Link to comment
Share on other sites

I can't actually believe that I didn't notice this typo. Appreciate it!

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.