it only crashes when i see it "live", inside jsbin seems to be working
var counter = 1;
var out = function nextNum() {
counter++;
var numArray = ["1","2","3"];
$('<span id="news' + counter + '" style="display:block; width:20px; height:20px;" />')
.html( Math.floor(Math.random()*numArray.length) ).appendTo('.div1')
.hide().fadeIn(100, function(){if(counter <= 20) nextNum();});};
(out)();
setInterval(rnd,1000);
function rnd() {
var letter = ["1","2","3"];
for (var spanum = 1;; spanum++)
$( "#news" + spanum ).html( Math.floor(Math.random()*letter.length) );}
http://jsbin.com/IQuxevu/4/edit
what am i doing wrong?