ScrollTrigger.getById
ScrollTrigger.getById( id:String ) : ScrollTrigger
Returns the ScrollTrigger that was assigned the corresponding id
Parameters
id: String
The identifier string that was used as the ScrollTrigger's
id
Returns : ScrollTrigger
The ScrollTrigger instance with the matching id
(or undefined if no matching ScrollTriggers are found)
Details
Returns the ScrollTrigger that was assigned the corresponding id
. For example:
ScrollTrigger.create({
id: "myID",
...
});
// then later...
let trigger = ScrollTrigger.getById("myID");