I'm using the jGFeed to retrieve RSS feed from distant server. Nothing hard, really. Issue I'm having is about the display of the feed : I'm trying to loop over each retrived element of the rss, and display it. Then remove it , and display the next one.
Here's how i'm trying to do so, without success :
$(document).ready(function() {
function loop(links){
var i = 0;
var arrayLength = links.length;
for (i=0;i<=arrayLength;i++){
$('#rssLink').empty().append(links[i]).fadeIn("slow");
setTimeout(function() {
$('#rssLink').fadeOut("fast");
}, 5000);
}
}
function animate(feeds){
var taille = feeds.length;
var links = [];
for ( var i = 0; i < taille; i++ ){
links[i] = "<a href='"+feeds[i].link+"'>"+feeds[i].title+"</a>";
}
loop(links);
}
$.jGFeed('http://www.wrc.com/services/newsrss.jsp',
function(feeds){
// Check for errors
if(!feeds){
// there was an error
return false;
}
animate(feeds.entries);
}, 50);
});