<p id="[email protected]">
<script type="text/javascript">
$(document).ready(function () {
GetSelfText('@item.ThreadID');
});
</script>
</p>
function GetSelfText(thingId) {
$.getJSON("http://www.reddit.com/r/playitforward/comments/" + thingId + "/.json?jsonp=?",
{ id: thingId },
function (data) {
$("#selfText-" + thingId).html(data[0].data.children[0].data.selftext_html)
})
}
Right now it's encoding the html and wrapping the html in quotations. I need it to be raw html. I also am trying to use a JQuery Expander and it's not working for ajax inserted content.
So I need to solve 2 problems. Insert the returned data as raw html and make the expander plugin work with ajax inserted content.