Jump to content
GreenSock

Search the Community

Showing results for tags '#oncomplete'.

  • 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, Everyone! I faced some problem in my code. Maybe i just not understand GSAP api. I have code like : $('a').click(function(e){ event.preventDefault(); var thishref = this.getAttribute('href'); //code down for some animation before redirect, in this example very simple TweenMax.to('body', 0 , {display: 'none', delay: 1, onComplete : href_redirect(thishref) }); }); function href_redirect(t_href) { document.location.href=t_href; } in theory sequencing be like : click to link > my animation start > my animation end > redirect . but in real - instant redirects, without waiting animation end. in now i forced use code like : $('a').click(function(e){ event.preventDefault(); var thishref = this.getAttribute('href'); TweenMax.to('body', 0 , {display: 'none', delay: 1, onComplete : href_redirect(thishref) }); }); function href_redirect(t_href) { setTimeout(function(){document.location.href=t_href;},3000); // delay manually } Someone please answer me - what i doing wrong in first example.
×