Skip to content

Instantly share code, notes, and snippets.

@adamcooke
Created December 17, 2014 09:16
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 adamcooke/16dd35606f8796dad315 to your computer and use it in GitHub Desktop.
Save adamcooke/16dd35606f8796dad315 to your computer and use it in GitHub Desktop.
<html>
<head>
<meta charset="UTF-8">
<title>RSS Feed</title>
<script src='https://code.jquery.com/jquery-2.1.1.min.js' type='text/javascript'></script>
<script>
$(document).ready(function() {
var $list = $('ul');
$.ajax({
url: "http://localhost:2368/rss/",
success: function(data) {
var $data = $(data);
$data.find('item').each(function() {
var $item = $(this);
var $li = $("<li><a href='" + $item.find('link').text() + "'>" + $item.find('title').text() + "</a><br />posted on " + $item.find('pubDate').text() + "</li>")
$list.append($li);
})
}
});
});
</script>
</head>
<body>
<ul></ul>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment