Hi,i need to set the unique numeric rel attributes for anchor elements in table with class "tdresult". Im trying to set them in the loop, but im not very good at Javascript and probably don't undestood loops.
$$('.tdresult').each(function(chooseClass) {
var ellen=chooseClass.getElements('a').length;
var eli=chooseClass.getElements('a').each(function(el){
for (i=0; i<ellen; i++){
var elic=el.set('rel',i++); //trying to set numeric ids for anchor els (from 0 to //max (ellen)
}
});
chooseClass.addEvent('mouseenter', function(el) {
infoGet(1,uniqueid); // function that sets the ajax request using unique id from loop
});
});
Can anyone advise me how to do this?