Show:

Module: animation/velocity

animation/velocity

Velocity.js animation module.

Extends

Methods

animate($elements, props, options, easing){Promise}

modules/animation/velocity.js, line 95

Animates an elements' properties.

Name Type Description
$elements Array.<HTMLElement>

wrapped HTMLElement to animate or an array of Elements.

props string | Object

valid CSS text to set on the element's style, or a map of style properties.

options Object | number optional

config object or duration in milliseconds.

easing string | Array optional

easing function name or array of values for generating an easing function.

Returns:
object returned by the Velocity.animate() call.

transit(widget, direction){Promise}

modules/animation/velocity.js, line 64

Transitions a widget's element into or out of view.

Related options:

  • transition: the transition configuration to perform. Defaults to uijet.options.transition which defaults to { opacity: [1, 0] } (fade).
  • transition_reverse: the reverse transition configuration to perform. Defaults to 'reverse' which reverses the in transition.
Name Type Description
widget Widget

the widget instance to transition.

direction string optional

direction of transition - 'in' or 'out'. Defaults to 'in'.

Returns:
object returned by the Velocity.animate() call.