Pages
    • GETTING STARTED
        • API REFERENCE
                                                                                                                                              • COMMAND LINE
                                                                                                                                                  On this page

                                                                                                                                                      .remove()

                                                                                                                                                      The timeline.remove() method.

                                                                                                                                                      This Timeline instance method is used to remove an Animation from the timeline.

                                                                                                                                                      Syntax

                                                                                                                                                      timeline.remove(animation);

                                                                                                                                                      Return

                                                                                                                                                      • this - The Timeline instance.

                                                                                                                                                      Usage

                                                                                                                                                      Obtain a timeline instance and call .remove().

                                                                                                                                                      // The timeline
                                                                                                                                                      let timeline  = new Timeline;
                                                                                                                                                      // The animation instance
                                                                                                                                                      let animation  = new Animation(el, {opacity:0});
                                                                                                                                                      
                                                                                                                                                      // Add
                                                                                                                                                      timeline.add(animation);
                                                                                                                                                      
                                                                                                                                                      // Then remove
                                                                                                                                                      timeline.remove(animation);