Skip to main content

animateValue

Callable

  • animateValue(element: string | HTMLElement, start: number, end: number, options?: { duration?: number; prefix?: string; suffix?: string; type?: string }): void

  • Smoothly animate a value from start to end


    Parameters

    • element: string | HTMLElement

      The element to animate the text of

    • start: number

      The starting value

    • end: number

      The ending value

    • optionaloptions: { duration?: number; prefix?: string; suffix?: string; type?: string }
      • optionalduration: number

        The duration of the animation in milliseconds

      • optionalprefix: string

        The prefix to add to the value

      • optionalsuffix: string

        The suffix to add to the value

      • optionaltype: string

        The type of value to animate

    Returns void