-
-
Save adamcooke/16dd35606f8796dad315 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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