« Back to the index

WA.get, Examples of Animation of nodes


There are 9 basic animations methods:
WA.get.() : will animate all the found nodes with the specified script.
WA.get.fadeIn(speed, callback): fade in the nodes. speed is in ms, or the values 'slow', 'medium', 'fast'. callback will be hit when the animation ends. The fade in applies directly on the opacity of the node. If the node is hidden, not visible or so, it will become visible. Only 'display' and 'opacity' are modified during the operation.
WA.get.fadeOut = function(s, f) { if (!WA.Managers.anim) return null; for (var i = 0, l = _nodes.length; i < l; i++) WA.Managers.anim.fadeOut(_nodes[i], s, f); return self; }
WA.get.openV = function(s, f, h) { if (!WA.Managers.anim) return null; for (var i = 0, l = _nodes.length; i < l; i++) WA.Managers.anim.openV(_nodes[i], s, h, f); return self; }
WA.get.closeV = function(s, f, h) { if (!WA.Managers.anim) return null; for (var i = 0, l = _nodes.length; i < l; i++) WA.Managers.anim.closeV(_nodes[i], s, h, f); return self; }
WA.get.openH = function(s, f, w) { if (!WA.Managers.anim) return null; for (var i = 0, l = _nodes.length; i < l; i++) WA.Managers.anim.openH(_nodes[i], s, w, f); return self; }
WA.get.closeH = function(s, f, w) { if (!WA.Managers.anim) return null; for (var i = 0, l = _nodes.length; i < l; i++) WA.Managers.anim.closeH(_nodes[i], s, w, f); return self; }
WA.get.open = function(s, f, w, h) { if (!WA.Managers.anim) return null; for (var i = 0, l = _nodes.length; i < l; i++) WA.Managers.anim.open(_nodes[i], s, w, h, f); return self; }
WA.get.close = function(s, f, w, h) { if (!WA.Managers.anim) return null; for (var i = 0, l = _nodes.length; i < l; i++) WA.Managers.anim.close(_nodes[i], s, w, h, f); return self; }
WA.get.move = function(s, x, y, f, l, t) { if (!WA.Managers.anim) return null; for (var i = 0, l = _nod

There is also a generic animation method:
WA.get.anim() : will animate all the found nodes with the specified script.

Let's play with some objects:
function test1() { }
CloseV red square OpenV red square



« Back to the index