Unable to output formatted HTML from Jquery with html DataType
I am calling some data which has pre-formatted HTML code in it, but when it renders from the jquery it appears to ignore my markup. This is my jQuery:
function GetFeed(){
document.getElementById("marq").innerHTML = '';
$.ajax({
type: "POST",
url: "xmlproxy.ashx",
dataType: "html",
success: function(obj) {
开发者_Go百科 $('<span class="tickerItem"></span>').html(obj).appendTo('#marq');
}
});
}
Your selector is wrong just do:
$("#marq").append(your_html);
精彩评论