]> git.pond.sub.org Git - eow/blob - static/dojo-release-1.1.1/dojox/fx/ext-dojo/NodeList.js
add Dojo 1.1.1
[eow] / static / dojo-release-1.1.1 / dojox / fx / ext-dojo / NodeList.js
1 if(!dojo._hasResource["dojox.fx.ext-dojo.NodeList"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
2 dojo._hasResource["dojox.fx.ext-dojo.NodeList"] = true;
3 dojo.provide("dojox.fx.ext-dojo.NodeList");
4 dojo.experimental("dojox.fx.ext-dojo.NodeList");
5 // summary: Core extensions to dojo.NodeList providing addtional fx to dojo.NodeList-fx
6 // description:
7 //      A Package to extend dojo base NodeList with fx provided by the dojox.fx project.
8 //      These are experimental animations, in an experimental 
9
10 dojo.require("dojo.NodeList-fx");
11 dojo.require("dojox.fx");
12
13 dojo.extend(dojo.NodeList, {
14
15         sizeTo: function(args){
16                 //      summary:
17                 //              size all elements of this NodeList. Returns an instance of dojo._Animation
18                 //      example:
19                 //      |       // size all divs with class "blah"
20                 //      |       dojo.query("div.blah").sizeTo({
21                 //      |               width:50,
22                 //      |               height:50
23                 //      |       }).play();
24                 return this._anim(dojox.fx, "sizeTo", args); // dojo._Animation
25         },
26
27         slideBy: function(args){
28                 //      summary:
29                 //              slide all elements of this NodeList. Returns an instance of dojo._Animation
30                 //              
31                 //      example:
32                 //      |       // slide all tables with class "blah" 10 px 
33                 //      |       dojo.query("table.blah").slideBy({ top:10, left:10 }).play();
34                 return this._anim(dojox.fx, "slideBy", args); // dojo._Animation
35         },
36
37         highlight: function(args){
38                 //      summary:
39                 //              highlight all elements of the node list.
40                 //              Returns an instance of dojo._Animation
41                 //      example:
42                 //      |       // highlight all links with class "foo" 
43                 //      |       dojo.query("a.foo").hightlight().play();
44                 return this._anim(dojox.fx, "highlight", args); // dojo._Animation
45         },
46
47         fadeTo: function(args){
48                 //      summary:
49                 //              fade all elements of the node list to a specified opacity
50                 //      example:
51                 //      |       // fade all elements with class "bar" to to 50% opacity
52                 //      |       dojo.query(".bar").fadeTo({ end: 0.5 }).play();
53                 return this._anim(dojo,"_fade",args);
54         },
55         
56         wipeTo: function(args){
57                 // summary:
58                 //              Wipe all elements of the NodeList to a specified width: or height:
59                 // example:
60                 //      | dojo.query(".box").wipeTo({ width: 300px }).play();
61                 return this._anim(dojox.fx, "wipeTo", args);
62         }
63
64 });
65
66 }