Erhm – not sure about this one. But here goes 🙂
I want a callback when all the .instagram-placeholders have been added.
But where, and how?
success: function(data) {
for (var i = 0; i < 30; i++) {
$("#instaWrap").append("<div class='instagram-placeholder'><a target='_blank' href='" + data.data[i].link +"'><img class='instagram-image' src='" + data.data[i].images.thumbnail.url +"' /></a></div>");
total += 1;
};
$("#instaWrap").append('<div class="clear"></div>');
}
Thanks a bunch 🙂
A simple answer would be:
But if you want to wait until all images are loaded, you can try this approach: