I'm using this plugin https://github.com/rmm5t/jquery-timeago/blob/master/jquery.timeago.js
When I load new content to the Dom, the auto-refresh (of previous content) of the timestamps sstops working (with that new loaded content, works just fine)...
I tried to use a modified version with Livequery on document.ready, but didn't work either..
The function to load new content is:
function reload_timeline(filter, more, update) {
if (update) {
$("#new_updates").hide();
}
beforeTimelineLoad(more, update);
$.post("/ajax/timeline_box_" + timeline_type + ".php", {
filter: filter,
timeline_type: timeline_type,
timeline_user_id: timeline_user_id,
smaller_id: timeline_smaller_id,
bigger_id: timeline_bigger_id,
start: timeline_start,
more: more,
update: update
}, function (data) {
if (data.length > 0 && timeline_type == "home") $("#pilltabs").show();
afterTimelineLoad(data, more, update, filter);
});
}
I tried doing something like
$("abbr.timeago", data).timeago();
in the "afterTimelineLoad" function, to apply the timeago() function to only the new abbr.timeago in the data, but dind't work either...
I really don't know what to try... Any clue?