Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

Returns : Tween

GSAP’s tween instance


Details

Provides a simple way to call a function after a set amount of time. You can optionally pass any number of parameters to the function too.

Note: - Due to the way JavaScript doesn’t maintain scope (what this refers to, or the context) in function calls, it can be useful to define the scope specifically. Therefore, the 3rd parameter allows you to define the scope.

  1. //calls myFunction after 1 second and passes 2 parameters:
  2. gsap.delayedCall(1, myFunction, ["param1", "param2"]);
  3. function myFunction(param1, param2) {
  4. //do stuff
  5. }
Copyright 2017, GreenSock. All rights reserved. This work is subject to theterms of useor for Club GreenSock members, the software agreement that was issued with the membership.
×