diff -r 80040858c006 -r 7b76d97e3051 client/compteur.html --- a/client/compteur.html Tue Feb 21 22:46:45 2012 +0100 +++ b/client/compteur.html Tue Feb 21 22:47:19 2012 +0100 @@ -7,20 +7,25 @@ @@ -41,6 +46,8 @@ * */ var searchKeywords = ['Sarkozy', 'Hollande', 'Bayrou']; + var totalTweets = 0; + $(function() { myTweetSource = new Btv_TweetSource({ @@ -48,16 +55,27 @@ }); myTweetSource.setOnNewTweets(function() { - var _filtered = this.afterDate(startHour); - $("#nbtweets").html(_filtered.count()); + totalTweets = this.afterDate(startHour).count(); }); + + setInterval(function() { + var _aff = parseInt($("#nbtweets").html()); + if (_aff < totalTweets) { + if (_aff) { + $("#nbtweets").html(1+_aff); + } else { + $("#nbtweets").html(totalTweets); + } + } + }, 200); });
-

Total des tweets #LGW

-

+

#LGW

+

Total des tweets

+

0