Hi Everyone
I am writing a code using Google-Ajax-Feed-API to get latest feeds from some site. I want the feeds to be checked for update every(say 1 secs?). I am able to retrieve the blogs but not able to refresh the DIV tags. Any help will be useful.
<script type="text/javascript">
google.load("feeds", "1");
$(document).ready(function(){
setInterval( initialize(),10000)
});
function initialize() {
var feed = new google.feeds.Feed("http://www.digg.com/rss/index.xml");
feed.setNumEntries(6);
feed.load(function(result) {
if (!result.error) {
var container = document.getElementById("feed");
for (var i = 0; i < result.feed.entries.length; i++) {
var entry = result.feed.entries[i];
var div = document.createElement("div");
div.appendChild(document.createTextNode(entry.title));
container.appendChild(div);
}
}
});
}
</script>
Thanks.