I am trying to setup absolute postion for all the images that are generated by ajax.
Here are my codes,
for loop...
var imagediv = document.getElementById('image_layout');
//generate many images
imagediv.innerHTML= imagediv.innerHTML + "<div class='imgDiv'>" + "<a href=\"#\""><img src=\"" + mystuff.list[n].imgPath \"" + "\" )\"" + "></a></div>";
//The image shows correctly but I want to set all of them in absolute position so I can create other effects.
I am not sure how to do it and appreciate if anyone can help me out here. Thanks a lot!!
I don’t see any AJAX going on, but in any case if you’re using jQuery then take full advantage of it: