Skip to content

Instantly share code, notes, and snippets.

@yetanotherchris
Created February 11, 2013 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yetanotherchris/4757998 to your computer and use it in GitHub Desktop.
Save yetanotherchris/4757998 to your computer and use it in GitHub Desktop.
jQuery Ajax
function ajaxFinish(xml)
{
$("FeedItemSummary", xml).each(function()
{
url = $("Url", this).text();
title = $("Title", this).text();
tldName = $("TldName", this).text();
content = $("Content", this).text();
publishDate = $("PublishDate", this).text();
hash = $("Hash", this).text();
feedImage = $("FeedImage", this).text();
// Add the title with a named anchor
$("#feedcontainer").append('<div class="feedItem"><a name="' + hash + '"></a>');
$("#feedcontainer").append('<a href="' + url + '" target="_blank" class="title">' + title + '</a><br/>');
// etc.
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment