Team:UCLondon/Templates/Navigationv3

From 2012e.igem.org

(Difference between revisions)
Line 28: Line 28:
   </div><!-- end navigation div-->
   </div><!-- end navigation div-->
-
   <div id=”twitter_update_list”></div>
+
   <div id="twitter-feed"></div>
-
  <script type=”text/javascript” src=”http://twitter.com/javascripts/blogger.js”</script>
+
-
  <script type=”text/javascript” src=”http://twitter.com/statuses/user_timeline/MBioinformatics.json?callback=twitterCallback2&count=1″></script>
+
   <style type="text/css">
   <style type="text/css">
Line 290: Line 288:
}
}
 +
function loadLatestTweet(){
 +
    var _url = 'https://api.twitter.com/1/statuses/user_timeline/MBioinformatics.json?callback=?&count=1';
 +
    $.getJSON(_url,function(data){
 +
        var tweet = data[0].text;
 +
        $("#twitter-feed").html('<p>'+tweet+'</p>');
 +
    });
 +
}
Line 301: Line 306:
   $('body').off('click', '#close-box', closeContactBox);
   $('body').off('click', '#close-box', closeContactBox);
   $('body').on('click', '#close-box', closeContactBox);
   $('body').on('click', '#close-box', closeContactBox);
 +
 +
    loadLatestTweet();
        
        
});
});

Revision as of 16:57, 14 October 2012