Jump to content
Search Community

Restart infinite timeline on hover

iamsebastn test
Moderator Tag

Go to solution Solved by mvaneijgen,

Recommended Posts

Hey there! 
I have some problem, which is breaking my head. I tried to figure it out over the last day but unfortunately I couldn't make it work. 
My goal is to create a blinking dot which is visible once the user hovers over the element. As soon as the user leaves the element the dot should be opacity 0 again. If the user enters again, the dot should blink again and so on.. 

What I come out with was, either the dot doesn't blink at all or it just has half of the opacity. So only going up to 50%.

I think this is kinda simple and I'm just standing on the hose 💀

Thank's @all!

See the Pen BaGJyag by iamsebastn (@iamsebastn) on CodePen

Link to comment
Share on other sites

  • Solution

Ha, why not just have a blinking animation and just hide and how the animation on hover on the element. No need for fancy JS, just simple CSS hover. 

 

See the Pen eYQymeG?editors=0100 by mvaneijgen (@mvaneijgen) on CodePen

 

Or .play() .pause() and .progress(0) the timeline, but create the animation outside of the hover. 

 

See the Pen dyQJPJa?editors=0010 by mvaneijgen (@mvaneijgen) on CodePen

 

Now with extra fade out tween 

 

See the Pen WNYdbJG?editors=0010 by mvaneijgen (@mvaneijgen) on CodePen

  • Like 2
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...