diff --git a/README.markdown b/README.markdown index 3969b06..85b007a 100644 --- a/README.markdown +++ b/README.markdown @@ -8,24 +8,32 @@ formatted dates and times embedded in your HTML (à la microformats). First, load jQuery and the plugin: - - +```html + + +``` Now, let's attach it to your timestamps on DOM ready: -
- jQuery(document).ready(function() { - jQuery("abbr.timeago").timeago(); - }); -+```html +
+ jQuery(document).ready(function() { + jQuery("abbr.timeago").timeago(); + }); ++``` This will turn all abbr elements with a class of timeago and an ISO 8601 timestamp in the title: - July 17, 2008 +```html +July 17, 2008 +``` into something like this: - about 1 day ago +```html +about 1 day ago +``` As time passes, the timestamps will automatically update.