summaryrefslogtreecommitdiff
path: root/js/dojo-1.7.2/dojox/fx/ext-dojo/NodeList-style.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/dojo-1.7.2/dojox/fx/ext-dojo/NodeList-style.js')
-rw-r--r--js/dojo-1.7.2/dojox/fx/ext-dojo/NodeList-style.js62
1 files changed, 62 insertions, 0 deletions
diff --git a/js/dojo-1.7.2/dojox/fx/ext-dojo/NodeList-style.js b/js/dojo-1.7.2/dojox/fx/ext-dojo/NodeList-style.js
new file mode 100644
index 0000000..10f4442
--- /dev/null
+++ b/js/dojo-1.7.2/dojox/fx/ext-dojo/NodeList-style.js
@@ -0,0 +1,62 @@
+//>>built
+define("dojox/fx/ext-dojo/NodeList-style", ["dojo/_base/lang", "dojo/_base/NodeList","dojo/NodeList-fx", "dojo/fx", "../style"],
+ function(lang, NodeList, NodeListFx, coreFx, styleX){
+// summary:
+// Core extensions to `dojo.NodeList` providing additional fx to `dojo.NodeList-fx`
+// from `dojox.fx.style`
+//
+// description:
+// A Package to extend dojo base NodeList with fx provided by the `dojox.fx` project.
+// These are experimental animations, in an experimental
+
+
+lang.extend( NodeList, {
+
+ addClassFx: function(cssClass, args){
+ // summary:
+ // Animate the effects of adding a class to all nodes in this list.
+ // see `dojox.fx.addClass`
+ //
+ // tags: FX, NodeList
+ //
+ // example:
+ // | // fade all elements with class "bar" to to 50% opacity
+ // | dojo.query(".bar").addClassFx("bar").play();
+
+ return coreFx.combine(this.map(function(n){ // dojo.Animation
+ return styleX.addClass(n, cssClass, args);
+ }));
+ },
+
+ removeClassFx: function(cssClass, args){
+ // summary:
+ // Animate the effect of removing a class to all nodes in this list.
+ // see `dojox.fx.removeClass`
+ //
+ // tags: FX, NodeList
+ //
+ // example:
+ // | dojo.query(".box").removeClassFx("bar").play();
+
+ return coreFx.combine(this.map(function(n){ // dojo.Animation
+ return styleX.removeClass(n, cssClass, args);
+ }));
+ },
+
+ toggleClassFx: function(cssClass, force, args){
+ // summary:
+ // Animate the effect of adding or removing a class to all nodes in this list.
+ // see `dojox.fx.toggleClass`
+ //
+ // tags: FX, NodeList
+ //
+ // example:
+ // | dojo.query(".box").toggleClass("bar").play();
+
+ return coreFx.combine(this.map(function(n){ // dojo.Animation
+ return styleX.toggleClass(n, cssClass, force, args);
+ }));
+ }
+});
+return NodeList;
+});