Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script src="http://code.jquery.com/jquery-1.10.2.js"></script>
- <ul id="feedlist"></ul>
- <script>
- $.ajax({
- type: 'POST',
- url: "feed.xml",
- dataType: "XML",
- success: function (data) {
- $(data).find("item").each(function () {
- console.log($(this).find("title"), $(this).find("description"))
- var li = $("<li></li>");
- li.append('<h3 class="feedtitle">' + $(this).find("title").text() + "</h3>");
- li.append('<span class="feeddescription">' + $(this).find("description").text() + "</span>");
- $("#feedlist").append(li);
- });
- }
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement