Is this the most efficient way to loop through json data and print a div block?
Should I be concerned having this much HTML being appended with js? Right now my json array is only 10 items, but what if it was 150. I've been away from development for quite some time and a LOT has changed. I would greatly appreciate any direction, thanks in advance!
Barry
$.getJSON('output.php', function(data) {
$.each(data, function(key, val) {
$("#winesFriends").append(function() {
return('<div id="wineBlock"><dl><dd><img src="img/sample_btl.jpg" alt="' + val.winery + ' - '+val.vintage+' '+val.varietal+' '+val.name+'"></dd><dt>' + val.winery + '</dt><dd>' + val.vintage + " " + val.name + '</dd></dl></div>');
});
});
});