Jump to content
Search Community

Issue with GSAP Custom Cursor - I can't work out why it breaks.

emilychews test
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 custom cursor I'm doing with GSAP, which all works OK when I move it around the page. 

 

I'm trying to add a "mouseover" event listener so when you hover over a link the cursor grows, not only is the function I'm using for this not working, but it breaks the entire custom cursor, but I can't work out why this is happening?

 

I've commented out the problematic "mouseover" function in question (at the very bottom of the Javascript) so you can see how the custom cursor should look, can anyone give any suggestions as to why it breaks?

 

Em

See the Pen OqQYxV by emilychews (@emilychews) on CodePen

Link to comment
Share on other sites

Just an FYI — I think a lot of people miss the Analyze JS function of CodePen. Hit that little dropdown on the right side of the JS panel and you'll find some helpful tools that can assist in troubleshooting. It'll also direct you to info on the web related to the issue. Here's a screen-grab of your pen.

 

6yaWNH4.jpg

  • Like 5
Link to comment
Share on other sites

1 hour ago, emilychews said:

Thank you both. It'd been a long day and that is a tad embarrassing. Ten thousand apologies.

 

This is a safe place, @emilychews! Happens to all of us! Just a few days ago, I sat and stared at the following wondering why it wasn't working ... for too long.

 

document.ready( function(){
  //stuff
});

 

I get it ?

  • Like 1
  • Haha 2
Link to comment
Share on other sites

The worst thing is when you spend two hours visiting forums, rereading documentation, rewriting it ten different ways... end up convinced that you have no idea what you're doing and then you see it... but for the typo, what you had to begin with, was fine. ?

  • Haha 5
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...