AnimatedNumbers

AnimatedNumbers

new AnimatedNumbers(element, options)

Source:
Parameters:
Name Type Description
element HTMLElement

DOM element for component instantiation and scope

options Object
Properties
Name Type Description
numberSelector String
animateOnVisible Boolean
animationDuration Number
animationStyle String

'linear' or 'random'

Classes

AnimatedNumbers

Methods

animateNumber()

Description:
  • Animate number from a starting value to an ending value over a duration, with optional easing and randomization.

Source:

destroy()

Description:
  • Destroy component.

Source:

handleIntersection()

Description:
  • Handle intersection observer events for viewport visibility

Source:

init()

Description:
  • Initialise component.

Source:

startAnimation()

Description:
  • Start animation for an element

Source:

(static) autoInit(root) → {AnimatedNumbers}

Source:
Parameters:
Name Type Description
root HTMLElement

DOM element for component instantiation and scope

Returns:

An instance of AnimatedNumbers.

Type
AnimatedNumbers