I have a bunch of imgs inside a div with a class on them, in my JS I have a for loop that re-sizes the images to fir inside a box without stretching
$('.gallery img')[i].attr('id', 'img' + i);
This is what I tried to get each img to have its own id like 'img1' 'img2' 'img3' etc
but it seems to not work