8000 Mark code blocks as HTML in README · rmm5t/jquery-timeago@299bfb5 · GitHub
[go: up one dir, main page]

8000 Skip to content

Commit 299bfb5

Browse files
committed
Mark code blocks as HTML in README
1 parent ade04a5 commit 299bfb5

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

README.markdown

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,32 @@ formatted dates and times embedded in your HTML (à la microformats).
88

99
First, load jQuery and the plugin:
1010

11-
<script src="jquery.min.js" type="text/javascript"></script>
12-
<script src="jquery.timeago.js" type="text/javascript"></script>
11+
```html
12+
<script src="jquery.min.js" type="text/javascript"></script>
13+
<script src="jquery.timeago.js" type="text/javascript"></script>
14+
```
1315

1416
Now, let's attach it to your timestamps on DOM ready:
1517

16-
<pre>
17-
jQuery(document).ready(function() {
18-
jQuery("abbr.timeago").timeago();
19-
});
20-
</pre>
18+
```html
19+
<pre>
20+
jQuery(document).ready(function() {
21+
jQuery("abbr.timeago").timeago();
22+
});
23+
</pre>
24+
```html
2125

2226
This will turn all abbr elements with a class of timeago and an ISO 8601 timestamp in the title:
2327

24-
<abbr class="timeago" title="2008-07-17T09:24:17Z">July 17, 2008</abbr>
28+
```html
29+
<abbr class="timeago" title="2008-07-17T09:24:17Z">July 17, 2008</abbr>
30+
```
2531

2632
into something like this:
2733

28-
<abbr class="timeago" title="July 17, 2008">about 1 day ago</abbr>
34+
```html
35+
<abbr class="timeago" title="July 17, 2008">about 1 day ago</abbr>
36+
```
2937

3038
As time passes, the timestamps will automatically update.
3139

0 commit comments

Comments
 (0)
0