I have the following jQuery get:
$.get("rssread.cfm?number=10", function (d) {
$('#feedContent').append($(d).html());
});
The get works fine and what it returns is some html of unordered lists and their items and anchor tags. No big deal. I know that the html is there and properly formed because I can do
$(d).find("ul li a").each(function (i) {
alert("text: " + $(this).text());
alert("href: " + $(this).attr('href'));
});
and see the data in the tags (by the alert). However, I really would like to view all of the HTML in $(d) so that I can do some testing, but for the life of me I cannot figure out how to put the contents of $(d) into the div or a span tag!!
The div tag is simply:
<div id="feedContent">
</div>
And this is the part that doesn't work (as seen at the very top of my post) that I expect would (the div comes up empty every time even though I know that $(d) contains the html.
$('#feedContent').append($(d).html());
Thanks for any help in advance!
Try simply doing this, if you're sure html is returned.