How To Display Timeago with Help of jQuery and PHP

Normally we need to show how much time user has been spent on websites, there are alot of CMS which has ineternal functionality to show user time ago times.
Here we can use jQuery plugin timeago, with help of jquery plugin we will display time ago time in hour/day and months.
To display time ago text we will use live jquery plugin “Live Query utilizes the power of jQuery selectors by binding events or firing callbacks for matched elements auto-magically, even after the page has been loaded and the DOM updated.”
You can download it from Here.

Step 1: Include necessray files in header section of application.

%MINIFYHTML78bedb9c1a08d278c3afecff38c85be56%%MINIFYHTML78bedb9c1a08d278c3afecff38c85be57%%MINIFYHTML78bedb9c1a08d278c3afecff38c85be58%

Step 2: Create a div container to display timeago time.



Php flow :  
(This will update every minute. Please wait for it.)

Step 3: Attached timeago function on target div:
[code type=jquery]

Result:

timeago

Download source