Jump to content
Search Community

Search the Community

Showing results for tags 'window.onload'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GreenSock Forums
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager
  • Supercharge

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Personal Website


Twitter


CodePen


Company Website


Location


Interests

Found 1 result

  1. Hi I have a landing page animation that i want to start after all the images and files have been downloaded. So... my js file looks like this window.onload = function() { var main = new TimelineMax({paused:true}); main.set($('.main__content'), {visibility: "visible"}) .from($('.main__content img'), 0.3, {autoAlpha: 0, scale: 0, ease: Power4.easeOut}) .staggerFrom($('.main__content h1 span'), 0.3, {autoAlpha: 0, ease: Power4.easeIn}, 0.15, 0) .from($('.main__content p'), 0.3, {autoAlpha: 0, ease: Power4.easeOut}) .from($('.main__content .call-to-action'), 0.3, {autoAlpha: 0, y: 50, ease: Power1.easeOut}) .from($('.main__social'), 0.3, {autoAlpha: 0, ease: Power4.easeOut}) .add('headerIn'); main.play(); }; and the '.main__content' has visibility : hidden in the css file when the page loads, the main__content remains hidden... and the animation is not seen... Any ideas what could be wrong. If i remove the gsap code from the window.onload function, it works fine, but i prefer to have the images load first. Many thanks!
×
×
  • Create New...