based on my previous question (HERE) ive updated my time ago code block, it works fine,the interval gets called every 10 sec but im faced with yet another silly problem . My problem is that i dont know how to load the function as soon as the body is loaded
my code (the important part)
$(".elapsed_time").each(function() {
time_r = $(this).data('time_raw');
var self = $(this);
var inter = function() {self.html(time_ago(time_r));}
setInterval(inter, 10000);
});