Jump to content
GreenSock

kathryn.crawford

Tween cursor on hover

Go to solution Solved by PointC,

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

Hey guys,

 

Is it possible to tween the cursor css property? I've got a div on my website that expands on hover, and I'd like to change the cursor when it expands so that you know to click on it to do more. So, is it possible to tween the cursor property? I've attached a codepen that's a basic example of what I'm trying to do. 

See the Pen yeZgXV by kathryncrawford (@kathryncrawford) on CodePen

Link to comment
Share on other sites

  • Solution

Hi Kathryn :),

 

You're really close. Just switch this 

.set(blah, {attr:{cursor: "default"}});

to this:

.set(blah, {cursor: "default"});

and it works as expected.

 

See the Pen KVJaGa by PointC (@PointC) on CodePen

 

:)

  • Like 3
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.
×