Jump to content

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

Hover Reveal

Recommended Posts



Im trying to make the images dissapear, by having them on negative yPos and the transitioning them on hover back on the screen.

mainly with

section.addEventListener('mouseenter', createHoverReveal);

section.addEventListener('mouseleave', createHoverReveal);



Is there something missing in my code? 


See the Pen bGgeGZY by faridguzman91 (@faridguzman91) on CodePen

Link to comment
Share on other sites

I noticed several things:

  • You're not loading GSAP
  • You're not calling your init() function, so none of your code is running
  • You never define the "sections" variable/Array
  • You've got JS errors, like calling functions that don't exist (getTextHeight(), updateBodyColor())

Once you fix those things, if you still need help feel free to post again. Good luck!

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