Jump to content
GreenSock

mattwilkie

Function to hide / show #ids TweenMax

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

Hello there to all GreenSock peeps.

 

I wondered if any of you could share some of your wisdom. I've recently taken over a web build and one of my first jobs is to change a animation banner feature which is using some of the TweenMax functionality. I have little previous knowledge on GreenSock but a few years back I worked with Flash AS2 & AS3.

 

All I am trying to acheive is to stop a number of images loading and displaying when you load the homepage and then to display them on a mouseover function.

 

Is there any documention out there or an example I could follow?

 

Hope you can help.

 

 

 

 

Link to comment
Share on other sites

Hi and welcome to the GreenSock forums,

 

Not really sure what you are doing with the loading of images, but to just show some elements when you rollover another element is fairly straightforward.

Take a look here: http://codepen.io/GreenSock/pen/JdEzbv?editors=011

 

notice that in the css i am hiding each .box when the page is initially rendered with

.box {
  opacity:0;
}

and this is the jQuery / TweenLite part

 

$("h1").mouseenter(function(){
  TweenLite.to(".box", 1, {opacity:1})
})
  • 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.
×