Hello guys, I have a newbie question...
Look at the Recent Activity Panel of this website:
Looking at the source code, I can see how they are animating the feed. But where are the ajax calls? How can something like this be implemented. I am sure this is very easy. But not for me ..
Here's how they are animating their feed:
<script type="text/javascript">
var delay = 2500;
var numCardsDownloaded = 200;
var numCardsToShow = 5;
var nextToShow = numCardsDownloaded - 1;
function animateFeed() {
toHide = (nextToShow + numCardsToShow) % numCardsDownloaded
$('#activity'+nextToShow).remove().prependTo('#activity-list').slideDown(1000);
$('#activity'+toHide).slideUp(1000);
nextToShow = (nextToShow + numCardsDownloaded - 1) % numCardsDownloaded
setTimeout('animateFeed()', delay);
}
$(document).ready(function() {
setTimeout('animateFeed()', delay);
});
</script>