diff --git a/index.html b/index.html index 0098264..06c71f8 100644 --- a/index.html +++ b/index.html @@ -87,7 +87,7 @@

Usage

You can initialize the smart-time-ago in global like:

 		   
-    $().timeago();	
+    $('body').timeago();
 		

It will watch all your relative time elements by only one TimeAgo instance.

Or you can use it in a specify scope like.

@@ -109,7 +109,7 @@

Usage

BTW if you need dynamic add the time element to your document without refreshing the page or you want to refresh the timeago manually. You might need call the refresh function to refresh the smart-time-ago like:

 			
-    $().timeago('refresh');
+    $('.timeago').timeago('refresh');
 		
@@ -133,7 +133,7 @@

Configuration

You can change the default configurations by passing the options to timeago function when initialize timeago like:

 		   
-    $().timeago({selector: 'span.timeago', attr: 'title', dir: 'down', suffix: 'from now'})	
+    $('.timeago').timeago({selector: 'span.timeago', attr: 'title', dir: 'down', suffix: 'from now'})