Hi guys.

Beginner question here, trying to add a class attribute "class" with
the value "imageX", where x is a variable, to all img's in a div.

var count=0;

$('imageContainer').getElements('img').each(function() {

      $('imageContainer').childNodes[count].set('class',
'image'+count);

});

This doesn't work, there must be an easier way. How do i select
"this", in the loop, so i dont have to navigate down the node tree
with "$('imageContainer').childNodes[count]"?


Thanks in advance.

Reply via email to