start-ffhh/js/main.js

21 lines
596 B
JavaScript
Raw Normal View History

2014-09-10 16:49:19 +02:00
var rss = [
'hamburg.freifunk.net'
];
$(document).ready(function() {
rss.forEach(function(feed) {
$.get('/feeds/' + feed + '.rss', function(data) {
2014-09-10 17:19:25 +02:00
$(data).find('item').forEach(function(entry) {
var title = $(entry).find('title').text();
var link = $(entry).find('link').text();
2014-09-10 16:49:19 +02:00
var item = $('<a>')
.attr('href', link)
.attr('target', '_blank')
.text(title);
$('#news').append($('<li>').append(item));
});
});
});
});