我正在尝试解决不对已经拥有它的元素重复 timeago 函数,而是将其添加到没有它的元素的问题。我正在尝试这个,但新添加的缩写没有被激活
<abbr title="2011-09-15T12:46:26" class="timeago">less than a minute ago</abbr>
function activate_timeago(){
setInterval(function(){
$('.timeago').each(function(){
if ($(this).data('active')!='yes'){
$(this).timeago();
$(this).data('active','yes');
}
});
},60000);
}
有任何想法吗?