Return to Snippet

Revision: 8318
at September 13, 2008 01:56 by ianmonge


Initial Code
// MooTools Looping Example (Bad/Long)

$$('.toggler').each(function(el) {
	el.addEvent('mouseenter',function(e) {
		el.fireEvent('click');
	});
});



// MooTools Collection Example (Good/Short)

$$('.toggler').addEvent('mouseenter', function() { this.fireEvent('click'); });

Initial URL
http://davidwalsh.name/element-collection-manipulation-shortcut-using-mootools

Initial Description


Initial Title
Element Collection Manipulation Shortcut Using MooTools 1.2

Initial Tags
javascript, array, function

Initial Language
JavaScript