/ Published in: jQuery
This snippet will display the latest post in a specified FeedBurner feed. Just set the URL to your desired FeedBurner feed.
This example assumes that there are 3 elements that this information will be sent to, with the ID attributes set to date, title and description respectively.
This example assumes that there are 3 elements that this information will be sent to, with the ID attributes set to date, title and description respectively.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$(document).ready(function(){ $.ajax({ type: "GET", url: "http://feeds.feedburner.com/examplefeed", success: function(data){ $("#date").text($(data).find("item:first>pubDate:first").text()); $("#title").html("<a href='"+$(data).find("item:first>link:first").text()+"'>"+$(data).find("item:first>title:first").text()+"</a>"); $("#description").html($(data).find("item:first>description:first").text()); } }); });