jQuery/JS Common - utils - fx - Methods

This section describes methods used to animate elements.

animate(element, config)

Animates an element.

Parameters:
element:

DOM Node

The element.

The element's animation options.

Return Value:

Promise<void> (jQuery or native)

A Promise that is resolved after animation is completed. It is a native Promise or a jQuery.Promise when you use jQuery.

If you execute element animation before the previous one is completed, the animation is passed to a queue and is executed after the current one finishes.

isAnimating(element)

Checks whether an element is being animated.

Parameters:
element:

DOM Node

The element.

Return Value:

Boolean

true if the element is being animated; otherwise false.

stop(element, jumpToEnd)

Stops an element's animation.

Parameters:
element:

DOM Node

The element.

jumpToEnd:

Boolean

Specifies whether to apply the target animation state or leave the current state.