Initialises and reacts to timeline events

Constructors

Methods

  • Left and right alignment of bubbles

    Alternates bubbles to left and right alignment if window is above 600 px width. If below 600 px width, left and right alignment is removed.

    Returns void

  • Show and hide images when they are in viewport.

    Initialises the observer for the images and then shows them when they enter the middle third of the viewport. Also hides them when they leave the middle third of the viewport.

    Returns void

  • Change of visibility of content on title press

    Initialises the collapsible text elements within the date bubbles with event listeners to show and hide the content when the title is pressed.

    Returns void

  • Debounces a function to prevent it from being called too frequently.

    Parameters

    • func: (...args: any[]) => void

      The function to debounce.

    • wait: number

      The time to wait before calling the function in milliseconds.

    Returns (...args: any[]) => void

    The debounced function.