0
데이터베이스에서 날짜를 가져옵니다. 시간은 전 시간이 잘 작동하지만 업데이트되지는 기준 날짜를 저장하는 data
매개 변수를 사용하는 데 필요한 모든의jQuery Timeago 플러그인 (PHP 포함)
<abbr class="timer timeago modified"><?php echo date('Y-m-d H:i:s', strtotime($row['project_create_date'])); ?></abbr>
JQuery와
$(function() {
/*Time Ago*/
prepareDynamicDates();
var time = '';
$('.timer').each(function(){
var time = $(this).text();
$(this).text(jQuery.timeago(time));
});
});
'setInterval()'을 사용하여 텍스트를 업데이트해야한다고 가정합니다. –