Merge pull request #55 from digitalex/patch-1

Updated the README to show correct markup for the activation script.
This commit is contained in:
Ryan McGeary 2012-02-21 06:12:57 -08:00
commit 389c1af715

View file

@ -13,14 +13,14 @@ First, load jQuery and the plugin:
<script src="jquery.timeago.js" type="text/javascript"></script> <script src="jquery.timeago.js" type="text/javascript"></script>
``` ```
Now, let's attach it to your timestamps on DOM ready: Now, let's attach it to your timestamps on DOM ready - put this in the head section:
```html ```html
<pre> <script type="text/javascript">
jQuery(document).ready(function() { jQuery(document).ready(function() {
jQuery("abbr.timeago").timeago(); $("abbr.timeago").timeago();
}); });
</pre> </script>
``` ```
This will turn all abbr elements with a class of timeago and an ISO 8601 timestamp in the title: This will turn all abbr elements with a class of timeago and an ISO 8601 timestamp in the title: