Skip to content

Instantly share code, notes, and snippets.

@kopiro
Created August 24, 2012 10:55
Show Gist options
  • Save kopiro/3449102 to your computer and use it in GitHub Desktop.
Save kopiro/3449102 to your computer and use it in GitHub Desktop.
Simple KopiroTimeAgo Implementation
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" id="jquery-script"></script>
<script type="text/javascript" src="https://raw.github.com/kopiro/kopiroTimeAgo/master/kopiro.timeago.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($){
$('time').kopiroTimeAgo({ granularity:5 });
});
</script>
</head>
<body>
<h3>Kopiro TimeAgo Test</h3>
<b>Remain time to Christmas: <time datetime="2012-12-25">...</time></b>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment