JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<head>
</head>
<body>
<p>Console</p>
<div>
</div>
</body>
</html
CSS
div {
border: 1px solid black;
}
img {
max-height: 200px;
max-width: 200px;
margin: 10px;
}
JavaScript
var bluearray = [
'http://fc02.deviantart.net/fs30/f/2008/056/8/0/Purple_hair___Bipasha_Basu_by_mstrueblue.jpg',
'http://static.becomegorgeous.com/img/arts/2010/Feb/20/1805/purple_hair_color.jpg',
'http://img204.imageshack.us/img204/6916/celenapurpleqp7.jpg'
];
var greenarray = [
'http://25.media.tumblr.com/tumblr_m7fqmkNEhc1qlfspwo1_400.jpg',
'http://www.haircolorsideas.com/wp-content/uploads/2010/12/green-red-hair.jpg',
'http://fc02.deviantart.net/fs71/i/2010/011/9/c/Neon_Yellow_and_Green_Hair_by_CandyAcidHair.jpg'
];
$(function() {
testone = addThumbs(bluearray);
testtwo = addThumbs2(greenarray);
});
function addThumbs(paths) {
$.each(paths,function(index, value) {
console.log("idx:"+index);
console.log("val:"+value);
$("div").append('<img src="' + value + '" />');
});
}
function addThumbs2(paths) {
for(index in paths) {
$("div").append('<img src="' + paths[index] + '" />');
}
}