Append Trakt.tv API
<p>I'm trying to query trakt.tv for my latest activity, but I only get a blank screen on proceeding with this script using jquery-1.4.4.js:</p>

<pre><code> $(document).ready(function(){ // on document load
    show_trakt();
 });

 function show_trakt() {
    var user = 'INSERT_USERNAME';
    var akey = 'INSERT_API_KEY';
    var data;
    var turl = 'http://api.trakt.tv/activity/user.json/'+akey+'/'+user+'/all/?callback=?';
    if($('.traktrecent ul').length &lt;= 0) { $('.traktrecent').append('&lt;ul /&gt;'); }
    $('.traktrecent').hide();
    $.getJSON(turl, function(data){
        var i=0;
        $.each(data.activity, function(index, item){
            if (i &lt; 11) {
                var ts = tc(item.timestamp);
                $('.traktrecent ul').append('&lt;li&gt;&lt;small&gt;'+ts+'&lt;/small&gt;: &lt;a class="lP" href="'+item.episode.url+'" target="_blank"&gt;'+item.show.title+'&lt;/a&gt; - &lt;cite&gt;'+item.episode.title+'&lt;/cite&gt;&lt;/li&gt;');
            }
            i++;
        });
        $('.traktrecent').fadeIn();
    });
 }




function tc(uts){
    var a = new Date(uts*1000);
    var mon = pad(a.getMonth()+1);
    var d = pad(a.getDate());
    var h = pad(a.getHours());
    var min = pad(a.getMinutes());
    var time = d+'/'+mon+' '+h+':'+min;
    return time;
}

function pad(number) {
    return (number &lt; 10 ? '0' : '') + number
}
</code></pre>

<p>Any help is much appreciated :-)</p>
