Namespace Jelo.Anim
Animation support.
Defined in: Jelo.Anim.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
<static> |
Jelo.Anim.Easing
Easing functions.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
Jelo.Anim.ate(config)
Animate a CSS property of a given element.
|
<static> |
Jelo.Anim.ating()
|
<static> |
Jelo.Anim.setDefaultDuration(Seconds,)
Changes the default animation duration, used whenever the duration property is not explicitly set.
|
<static> |
Jelo.Anim.stopAll()
Immediately halts and cancels all pending animations.
|
Field Detail
<static>
{Object}
Jelo.Anim.Easing
Easing functions.
- LINEAR: no easing, default
- IN: accelerate (speed up)
- OUT: decelerate (slow down)
- SMOOTH: accelerate, then decelerate
- OVERSHOOT: go past the end value, then come back. occasionally causes errors in IE depending on the animated property.
- SPRING: repeated overshoot around the end value
- WOBBLE: forward, back, then forward again in a single duration
Method Detail
<static>
Jelo.Anim.ate(config)
Animate a CSS property of a given element.
- Parameters:
- {Object} config
- A configuration object.
- {HTMLElement|String} config.me
- Object to animate, or a CSS selector for which the first matching element will be used.
- {String} config.css
- Property to animate.
- {String|Number} config.from Optional
- Starting value for the animation.
- config.to
- {String|Number} Ending value for the animation
- {Function} config.before Optional
- Method to invoke immediately before the animation starts.
- {Function} config.after Optional
- Method to invoke immediately after the animation finishes.
- {Number} config.duration Optional, Default: 0.5
- How many seconds the animation should last.
- {Function|String} config.easing Optional, Default: "linear"
- How to calculate property values. If a string is supplied, it must match a Jelo.Anim.Easing property name (case insensitive).
<static>
{Boolean}
Jelo.Anim.ating()
- Returns:
- {Boolean} True if there are currently animations in the queue.
<static>
Jelo.Anim.setDefaultDuration(Seconds,)
Changes the default animation duration, used whenever the duration property is not explicitly set.
- Parameters:
- {Number} Seconds,
- as a whole or decimal number.
<static>
Jelo.Anim.stopAll()
Immediately halts and cancels all pending animations. References are not stored, the animations are gone.