How should I declare an object variable in Javascript? By mistake, I thought I was in PHP and it worked.
$(res.data).each(function(index, value){
$src = value.images.fixed_height;
$('<a href="'+value.url+'" target="_blank"><img src="' + $src.url + '" width="' + $src.width +'" height="' + $src.height + '"></a>').load(function(){
$(this).appendTo("#results").fadeIn();
})
});
Then, when I tried to think in terms of Javascript it didn't work,
$(res.data).each(function(index, value){
var src = value.images.fixed_height;
$('<a href="'+value.url+'" target="_blank"><img src="' + src.url + '" width="' + src.width +'" height="' + src.height + '"></a>').load(function(){
$(this).appendTo("#results").fadeIn();
})
});