Jump to content
Search Community

Why is TweenLite.set() canceling itself out?

soupking 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

Hi everybody,

 

I'm trying to build rollover thumbnails.

 

In doing so I have two lines of TweenLite.set():

 

TweenLite.set([img1, img2, img3, img4, img5, img6, img7, img8], {opacity:0});
TweenLite.set([img1_hover, img2_hover], {opacity:0});
 
For some reason the second line won't work unless the first line is commented out. I've tried various things to make both the thumbnail and the hover state invisible but for some reason it doesn't work unless the first line is omitted (even if I put the img1_hover instance in the first line??)
 
Can anybody out there tell me why this happens or direct me to maybe a thumbnail rollover tutorial? I've been doing a lot of searching and haven't come up with much.
 
Thanks for reading. :)
 
Link to comment
Share on other sites

Tough to say without seeing a sample - my only guess is that you have some sort of typo in the first line that's halting JavaScript execution. I tested your code on my own demo and it worked perfectly, so there must be something else happening. Please provide a simple codepen demo so that we can observe it in context. 

 

http://forums.greensock.com/topic/9002-read-this-first-how-to-create-a-codepen-demo/

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