html += '<ul>';
var url = '/jr/public/ajax/stories.php?storyId=' + data.storyId + '&type=comments' ;
jQuery.getJSON(url,function(datum){
jQuery.each(datum,function(i,elm){
html += '<li><div class="c-thumb">';
html += '<img alt="" src="'+elm.thumbImageUrl+'"/>';
html += '<div class="c-text">';
html += '<h6><a href="">'+elm.userName+'</a> - '+elm.dateStamp+'</h6>';
html += '<p>' + elm.commentContent+'</p>';
html += '</div></li>';
});
});
html += '</ul>';
The html variable is not adding the content from the getJSON function to the html variable set outside the scope.