Jump to content
Search Community

Custom cursor limitation

Mattrudd test
Moderator Tag

Go to solution Solved by Cassie,

Recommended Posts

Hi folks,

 

I've set up a video div that opens a video Lightbox when clicked. 

 

I'm using a custom cursor to nudge user interaction... the issue I have is the transitions between 'PLAY' and 'EXIT' are a little clunky.

 

I've cobbled together some short GSAP tweens in if/else statements to  manage the showing and hiding of the relevant cursors.

 

The issue - if the mouse isn't moved at all once the Lightbox is opened, exit won't appear, because of course the event listener is set to "mousemove".

Conversely, if the mouse isn't moved after exit and the cursor is over the blue thumbnail placeholder, it continues to show exit.

 

Appreciate this is standard behaviour, but in this particular instance it's not great for UX (exit still displayed after exiting!)

I'm wondering if there's an adjustment or a GSAP capability I've not aware of I could add to my tweens to allow for the hiding of the EXIT cursor automatically when the video Lightbox is no longer in view? Had a look at quickSet but the examples there with cursors seem to be centred around mouse movement also.
 

P.S. the demo is as minimal as I could think to get it while still showing the lightbox in action!

See the Pen BarGZXv by matt-rudd (@matt-rudd) on CodePen

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...