Group.js

For Grouping Classes or Elements Events.  The Event added to the Group will fire when all of the events of the items of the group are fired.

License

MIT-style license.

Summary
Group.jsFor Grouping Classes or Elements Events.
GroupAn “Utility” Class.
Properties
addEventadds an event to the stack of events of the Class instances.

Group

An “Utility” Class.

Arguments

List of Class instances

Example

xhr1 = new Ajax('data.js', {evalScript: true});
xhr2 = new Ajax('abstraction.js', {evalScript: true});
xhr3 = new Ajax('template.js', {evalScript: true});
 
var group = new Group(xhr1, xhr2, xhr3);
group.addEvent('onComplete', function(){
    alert('All Scripts loaded');
});
 
xhr1.request();
xhr2.request();
xhr3.request();
Summary
Properties
addEventadds an event to the stack of events of the Class instances.

Properties

addEvent

adds an event to the stack of events of the Class instances.

Arguments

typestring; the event name (e.g.  ‘onComplete’)
fnfunction to execute when all instances fired this event

Documentation by Aaron Newton & Mootools Developers, generated by NaturalDocs and GeSHi