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 necessary files in header section of application.

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

Step 3: Attached timeago function on target div:

Result:

timeago

You can download source code from below link.