Text Formatted Code
<style>
#random img {
width: 100%;
max-width: 200px;
height: auto;
}
</style>
<div id="random" align="center"></div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<script>
$(document).ready(function(){
$.get('/backend/geeklog.rss', {}, function(data){
// Store our items in an array.
var items = [];
$(data).find('item').each(function(){
items.push({
title: $(this).children('title').text(),
description: $(this).children('description').text().replace(/<script/gi, ''),
link: $(this).children('link').text()
});
});
var i = Math.floor(Math.random()*(items.length+1));
$('#random')
.append($('<a />').attr('href', items[i].link)
.append($('<img />').attr('src', $('<div />')
.append(items[i].description).find('img').attr('src'))))
.append($('<h2 />').text(items[i].title));
});
});
</script>