I am trying to display images into thumbnails for my image gallery by using for...in
loop but it is only able to display one image. I am still a beginner in javascript, so my understanding of for loops is still not good. Where did I go wrong?
sample array:
["http://tos-staging-web-server-s3.s3.amazonaws.com/9/catalogue/apples_in_season.png",
"http://tos-staging-web-server-s3.s3.amazonaws.com/9/catalogue/apples_in_season.png"]
for...in
loop:
for(var thumb in thumbnails) {
$('.thumbnail img').attr({"src":[thumbnails[thumb]]});
}