How to move jquery function/callback into document ready
<p>How can I change this code so that I can add it to the standard document ready for jquery so that all my scripts are together. </p>

<pre><code> /*
 * Fetch RSS feed once page has finished loading.
 */
(function(url, callback) {
    jQuery.ajax({
        url: document.location.protocol + '//ajax.googleapis.com/ajax/services/feed/load?v=1.0&amp;num=10&amp;callback=?&amp;q=' + encodeURIComponent(url),
        dataType: 'json',
        success: function(data) {
            callback(data.responseData.feed);
        }
    });
})('http://www.bet365.com/news/en/betting/sports/rss', function(feed){
    var entries = feed.entries, content, publishDate;
    for (var i = 0; i &lt; entries.length; i++) {
        publishDate = new Date(entries[i].publishedDate);
        date = publishDate.getDate() + '/' + publishDate.getMonth() + '/' + publishDate.getFullYear();
        content = truncateText((entries[i].contentSnippet) ? entries[i].contentSnippet : entries[i].content, 100);
        jQuery('#rss &gt; ul').append('&lt;li&gt;&lt;a href="' + entries[i].link + '" title=" ' + content + ' " target="_blank"&gt;&lt;span&gt; ' + date + '&lt;/span&gt;' + entries[i].title + '&lt;/a&gt;&lt;/li&gt;');
    }
});
</code></pre>
