Jump to content
Search Community

Just started, can't get it to work at all...

failure13 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

:hover is not a className, so GSAP won't find any styles for that. There was also a syntax error in your tweens (missing } at the end of the vars object) so they wouldn't have fired anyway.

 

See the Pen fmzak by jamiejefferson (@jamiejefferson) on CodePen

 

Key changes:

<body class='nojs'>
<!-- remove .nojs on document ready so you can tell the difference between
a page with js and one without -->
$(document.body).removeClass('nojs');
/* only use :hover when .nojs, as CSS :hover triggers before javascript
hover, so GSAP will see the starting values as the :hover ones and have
nothing to tween to */
ul#menu li a.active,
ul#menu li a.hover,
.nojs ul#menu li a:hover {
  ...
}
  • Like 2
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...