new AnimatedNumbers(element, options)
- Source:
Parameters:
| Name | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
element |
HTMLElement | DOM element for component instantiation and scope |
|||||||||||||||
options |
Object |
Properties
|
Classes
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