Need help loading images with .each
Hey Guys, I am trying to load the images with JSON using the $.get function. On the console log I can see the name of of the images when I hover over the img var, but for some reason its not loading. I'm not sure what I am doing wrong here.
Any help would be really appreciated!!
- <div id="container">
<div align="center" class="loader"><img src="images/loading.gif" id="load" width="400" height="400" align="absmiddle"/></div>
</div>
- $.getJSON("data.json", function(data) {
$.each(data.paintings.painting, function (k,v) {
var img = v.image;
$("#container").append("<img src=\"images/" + img + " width=\"200\" height=\"225 />" + "<br/>" );
});
}); // End of the $.getJSON function