cycle method added to auto cycle through tweets and exception handling is modified to capture all errors that raise from twitter

This commit is contained in:
AnithaPal 2016-07-27 17:02:40 -04:00
parent f29a15b8e4
commit 881518f1f3
10 changed files with 73 additions and 56 deletions

View file

@ -1,6 +1,17 @@
$(document).ready(function() {
// will call refreshCurrentEvents every 15 minutes
setInterval(refreshCurrentEvents, 900000)
setInterval(refreshCurrentEvents, 900000)
// To cycle through tweets
var tweets = $('div[id^="tweet"]').hide();
var i = 0;
(function cycle() {
tweets.eq(i).show(0)
.delay(5000)
.hide(0, cycle);
i = ++i % tweets.length;
})();
});
function refreshCurrentEvents(){