168
rated 0 times
[
172]
[
4]
/ answers: 1 / hits: 43874
/ 11 Years ago, fri, january 17, 2014, 12:00:00
I get JSON data with next code:
$.getJSON(
data.json,function foo(result) {
$.each(result[1].data.children.slice(0, 10),
function (i, post) {
$(#content).append( '<br> HTML <br>' + post.data.body_html );
}
)
}
)
<div id=content></div>
Some of strings included : <
and >
and this did not displaying as regular html <
, >
Try to use .html()
instead .append()
did not work.
Here is live example http://jsfiddle.net/u6yUN/
More From » jquery