How to implement jquery Timeago with php
Jquery 17-Oct-2019

How to implement jquery Timeago with php

In social media we can see that posting time changes frequently seconds ago, minutes ago and hours ago etc, so today i am going to write a tutorial on timeago jquery and its easy implementation with PHP. Please follow the instruction given in download package to implement it in your web applications.


Contains javascript code. $(this).timeago() here this element is refers to timeago class selector of the anchor tag.

<script src="//"></script>
<script type="text/javascript" src="js/jquery.livequery.js"></script>
<script type="text/javascript" src="js/jquery.timeago.js"></script>
<script type="text/javascript">
$(".timeago").livequery(function() // LiveQuery 
$(this).timeago(); // Calling Timeago Function 

//HTML & PHP Code

$time=time(); // Current time-stamp eg: 1371612613
$mtime=date("c", $time); // Converts to date format 2013-06-19T03:30:13+00:00 

You opened this page <a href='#' class='timeago' title="<?php echo $mtime; ?>"></a>