Why does this won't work?
var data = {"one": [
{"slot1":true, "app":"facebook"},
{"slot2":true, "app2": "facebook"}
]};
$(data.one).each(function() {
if(this.slot1==true){
$('#dropable').find('.1_1').append('<img src="img/apps/' + this.app1 + '.png" alt="' + this.app1 + '">');
}
if(this.slot2==true){
$('#dropable').find('.1_2').append('<img src="img/apps/' + this.app2 + '.png" alt="' + this.app2 + '">');
}
});
my #dropable:
<div id="dropable" class="drag"><div class="app 1_1"></div></div>
<div id="dropable" class="drag"><div class="app 1_2"></div></div>
this.app1is undefined, but it should have still worked, it just would have given you the text"undefined"as alt text and the image name which should have been clearly visible with inspect element.droppable