Return to Snippet

Revision: 33270
at October 7, 2010 13:03 by tstachl


Initial Code
cloneEventsDeep: function(from, type){
	if (this.getChildren().length > 0) {
		this.getChildren().each(function(item, index) {
			item.cloneEventsDeep(from.getChildren()[index], type);
		});
		this.cloneEvents(from, type);
	} else {
		this.cloneEvents(from, type);
	}
	return this;
}

Initial URL

                                

Initial Description
Put this snippet into the mootools core file right next to the cloneEvents function.

Initial Title
Mootools cloneEventsDeep clones events from children too

Initial Tags

                                

Initial Language
JavaScript