Animation

Provides standardization options to animate DOM HTML elements.

Properties

delay Number

Specifies the delay in milliseconds to start the animation.

Default: 0

duration Number

Specifies the duration in milliseconds of the animation.

Default: 400

name Effect

Specifies the duration in milliseconds of the animation.

Default: FadeIn

timingFunction Easing

Specifies the animation timing function.

Default: Ease

Methods

addEventListener

Attaches an event handler to a specified element. This method allows you to set up a function that will be called whenever the specified event is delivered to the target element.

Parameter Type Description
eventName String A string value that defines the name of the event.
handler Function Defines the function to run when the event is triggered.

Returns: Void

animate

Applies the animation to the given HTML element.

Parameter Type Description
element String HTMLElement Specifies the HTML element the animation will be applied to.
options AnimationModel Specifies the animation settings.

Returns: Void

dataBind

Applies all pending property changes to the Button.

Returns: Void

removeEventListener

Removes the attached event handler for the specified event listener.

Parameter Type Description
eventName String A string value that defines the name of the event to be removed.
handler Function Defines the function to be removed.

Returns: Void

stop

Stops the animation effect on the HTML element.

Parameter Type Description
element String HTMLElement Specifies the HTML element the animation will be stopped on.
options AnimationModel Specifies the animation settings.

Returns: Void

Events

begin EmitType<AnimationOptions>

Event is triggered when the animation starts.

end EmitType<AnimationOptions>

Event is triggered when the animation is completed.

fail EmitType<AnimationOptions>

Event is triggered when the animation encounters a failure.

progress EmitType<AnimationOptions>

Event is triggered when the animation is in progress.