[Answer]-JavaScript setInterval – function only called once

1👍

var get_timeline = 
   Dajaxice.modules.ticker.get_home_timeline(get_home_timeline_callback);

That is not a closure to call the function, that immediately invokes the function (before you even set up the interval).

In think you want

var get_timeline = function(){
   Dajaxice.modules.ticker.get_home_timeline(get_home_timeline_callback);
};
👤Thilo

Leave a comment