move news into its own folder and file

This commit is contained in:
Jon Heller
2015-10-19 00:42:34 -04:00
parent c2f9d0a06c
commit 859b7591fc
4 changed files with 128 additions and 34 deletions

View File

@@ -26,9 +26,6 @@ function roundVal(temp)
jQuery(document).ready(function($) {
var news = [];
var newsIndex = 0;
var eventList = [];
var lastCompliment;
@@ -180,31 +177,6 @@ jQuery(document).ready(function($) {
weather.init();
(function fetchNews() {
$.feedToJson({
feed: feed,
success: function(data){
news = [];
for (var i in data.item) {
var item = data.item[i];
news.push(item.title);
}
}
});
setTimeout(function() {
fetchNews();
}, 60000);
})();
(function showNews() {
var newsItem = news[newsIndex];
$('.news').updateWithText(newsItem,2000);
newsIndex--;
if (newsIndex < 0) newsIndex = news.length - 1;
setTimeout(function() {
showNews();
}, 5500);
})();
news.init();
});