Team:UCLondon/Templates/Navigationv3

From 2012e.igem.org

(Difference between revisions)
Line 291: Line 291:
function loadLatestTweet(){
function loadLatestTweet(){
 +
    $('#twitter').html('');
     var numTweets = 3;
     var numTweets = 3;
     var _url = 'https://api.twitter.com/1/statuses/user_timeline/MBioinformatics.json?callback=?&count='+numTweets+'&include_rts=1';
     var _url = 'https://api.twitter.com/1/statuses/user_timeline/MBioinformatics.json?callback=?&count='+numTweets+'&include_rts=1';
Line 299: Line 300:
             var createdDate = created.getDate()+'-'+(created.getMonth()+1)+'-'+created.getFullYear()+' at '+created.getHours()+':'+created.getMinutes();
             var createdDate = created.getDate()+'-'+(created.getMonth()+1)+'-'+created.getFullYear()+' at '+created.getHours()+':'+created.getMinutes();
             tweet = tweet.parseURL().parseUsername().parseHashtag();
             tweet = tweet.parseURL().parseUsername().parseHashtag();
-
             tweet += '<div class="tweeter-info"><div class="uppercase bold"><a href="https://twitter.com/#!/CypressNorth" target="_blank" class="black">@CypressNorth</a></div><div class="right"><a href="https://twitter.com/#!/CypressNorth/status/'+data[i].id_str+'">'+createdDate+'</a></div></div>'
+
            alert(tweet);
 +
             tweet += '<div class="tweeter-info"><div class="uppercase bold"><a href="https://twitter.com/#!/MBioinformatics" target="_blank" class="black">@MBioinformatics</a></div><div class="right"><a href="https://twitter.com/#!/CypressNorth/status/'+data[i].id_str+'">'+createdDate+'</a></div></div>'
             $("#twitter").append('<li>'+tweet+'</li>');
             $("#twitter").append('<li>'+tweet+'</li>');
         }
         }

Revision as of 17:51, 14 October 2012