Here is my little script:
<script type="text/javascript"> jQuery(document).ready(function(){ jQuery.ajax({ url: "/feed.xml", // RSS url success: function(msg){ jQuery('#blip').html(''); // where to put RSS jQuery('entry',msg).slice(0,3).each(function(){ // slice: get only first 3 posts var html = '<div>'; var upd = jQuery('updated', this).text().replace(/[TZ]/g, ' '); var upd = jQuery.trim(jQuery('updated', this).text()); upd = upd.replace(/-/g,"/").replace(/T/," ").replace(/Z/," UTC"); upd = upd.replace(/([\+-]\d\d)\:?(\d\d)/," $1$2"); updf = new Date(upd).toLocaleString(); html += '<p class="post_date">' + updf + '</p>'; html += '<div class="post_content"><span>' + jQuery('content', this).text() + '</span></div>'; html += '</div>'; jQuery(html).appendTo('#blip'); }); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(errorThrown);} }); }); </script>
source share