My script receives some data from a PHP page. One item called "content" contains HTML code. I have to put my HTML code in a div but unfortunately, it is appended as plain text. How can I append it to the DOM as real HTML? This is my jQuery code:
$.ajax({
'url': 'ajaxdashboard.php',
dataType: 'json',
cache: false,
success: function (json) {
$.each(json, function (key, value) {
for (i = 0; i < value.length; i++) {
$('#arguments').append('<div class="well student" style="display: none;" id="post-' + value[i].id + '"><h3>' + value[i].title + '</h3><span>Published by <font color="blue"><b>' + value[i].name + ' ' + value[i].surname + '</b></font></span><br><br><span id="post-content-' + value[i].id + '"></span></div>');
$('#post-content-' + value[i].id).html(value[i].content);
$('#post-' + value[i].id).fadeIn();
}
});
}
});