mirror of
https://github.com/scratchfoundation/jquery-timeago.git
synced 2024-11-23 15:57:54 -05:00
Merge pull request #55 from digitalex/patch-1
Updated the README to show correct markup for the activation script.
This commit is contained in:
commit
389c1af715
1 changed files with 4 additions and 4 deletions
|
@ -13,14 +13,14 @@ First, load jQuery and the plugin:
|
|||
<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
|
||||
<pre>
|
||||
<script type="text/javascript">
|
||||
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:
|
||||
|
|
Loading…
Reference in a new issue