JSFiddle - React, Tailwind, and code Playground

by hhanuman

HTML

<script src="http://dl.dropbox.com/u/267716/js/jquery.jgfeed.js"></script>
<script src="http://dl.dropbox.com/u/267716/js/jqueryTimers-1.2.js"></script>
<p class="countr">
<ul id="feedz"></ul>

CSS

#feedz{font-size:12px;}
#feedz li{
padding:5px;}
.countr{position:fixed;
top:5px;left:90%;}

JavaScript

var a = "http://twitter.com/statuses/user_timeline/26767000.rss";
var b = "http://index.hu/24ora/rss/";
var c = "http://hvg.hu/rss";
var d = "http://origo.hu/contentpartner/rss/hircentrum/origo.xml";
var e = "http://feeds.wired.com/wired/index?format=xml";

//var daFeed = c;
addFeed(b,0.7);
addFeed(c,1.2);

function addFeed(daFeed, interval){

getFeed(daFeed);
var min = interval;
$("body").everyTime(min*60000,function(i){
    $(".countr").html(i);
    $("#feedz").empty();
    getFeed(daFeed);
    $('html, body').animate({ 
       scrollTop: $(document).height()+$(window).height()},1400);

});

function getFeed(daFeed){
$.jGFeed(daFeed,
  function(feeds){
    // Check for errors
    if(!feeds){
      // there was an error
      return false;
    }
    // do whatever you want with feeds here
    for(var i=0; i<feeds.entries.length; i++){
      var entry = feeds.entries[i];
        $("<li></li>")
            .html(entry.title)
            .appendTo("#feedz");
    }
  }, 10);

};

};