of course you could have wriitten that as:
new Element('div', {ID: "tigerShark"});
Was just showing you how to set ID :-)
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Aske
Sent: Thursday, March 11, 2010 10:11 AM
To: MooTools Users
Subject: [Moo] Re: Add class to all img's in div
cool thanks everyone. i went with:
$('imageContainer').getElements('img').each(function(img, index) {
img.addClass('image'+ index);
});
Since i have to do some other stuff inside the function.
One last question, how do i add an "ID" to an element, i don't see any
addID function?