| Overview | Index | GodLikeMouse JavaScript Framework |
| FRAMES | NO FRAMES |
GLM.DOM.Animate
Starts an animation on an element.
Parameters:
elements - An element to animate, or an array of elements, or the name(s) of the elements.
time - The duration in ms of the animation.
frameCount - The maximum frame count of the animation.
params - An object (or array of objects) containing the animation procedures. If an array is passed, each item is used to animate the corresponding element from the elements parameter. Each field of the array is a function, and each field's name is a style parameter. On each frame of the animation, each function is called and the return value is assigned to the style parameter. A value from 0 to 1 indicating the progress of the animation is passed into each function. Instead of a function, a string may be passed: this string is eval'ed in a context where the completion is represented by "pc" or "complete". The field "opacity" may be used to set the opacity, even though it isn't portable.
finish - An optional function to call when the animation is complete.
Returns:
A context object that may be used to query the progress of the animation, cancel the animation, or proceed to the completed state. This object represents the context of subsequent, nested animations as well.
Example:
GLM.DOM.Animate("menu", 200, 30, {height:function(pc){return Math.floor(300*pc)}, null);
| Overview | Index | GodLikeMouse JavaScript Framework |
| FRAMES | NO FRAMES |