Skip to content

Commit 724f17c

Browse files
committed
Update README with CSS class info
1 parent f47dd42 commit 724f17c

File tree

1 file changed

+35
-5
lines changed

1 file changed

+35
-5
lines changed

README.md

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,43 @@ Then start the timer with:
1818
$('.timer').startTimer();
1919
```
2020

21+
The plugin creates `<div>` elements with the following CSS classes by default:
22+
23+
* `jst-hours`
24+
* `jst-minutes`
25+
* `jst-seconds`
26+
* `jst-clearDiv`
27+
* `jst-timeout` _(added only when the timer is finished)_
28+
29+
Here's an example of the HTML of a finished timer:
30+
31+
```HTML
32+
<div class="timer jst-timeout" data-seconds-left="3">
33+
<div class="jst-hours">00:</div>
34+
<div class="jst-minutes">00:</div>
35+
<div class="jst-seconds">00</div>
36+
<div class="jst-clearDiv"></div>
37+
</div>
38+
```
39+
40+
The default CSS classes can be used to style the timer or we can specify [custom classes](https://github.com/caike/jQuery-Simple-Timer/blob/master/tests/tests.js#L342-L348)
41+
via the `classNames` option. Like this:
42+
43+
```javascript
44+
$('.timer').startTimer({
45+
classNames: {
46+
hours: 'myClass-hours',
47+
minutes: 'myClass-minutes',
48+
seconds: 'myClass-seconds',
49+
clearDiv: 'myClass-clearDiv',
50+
timeout: 'myClass-timeout'
51+
}
52+
});
53+
```
54+
2155
## Options
2256

23-
For more options, checkout [http://csouza.me/jQuery-Simple-Timer/](http://csouza.me/jQuery-Simple-Timer/)
57+
For more options, checkout [http://csouza.me/jQuery-Simple-Timer/](http://csouza.me/jQuery-Simple-Timer/) and [some more examples.](https://rawgit.com/caike/jQuery-Simple-Timer/master/examples/index.html)
2458

2559
## Install
2660

@@ -57,10 +91,6 @@ $(function(){
5791
});
5892
```
5993

60-
## Live Examples
61-
62-
Open [examples/index.html](https://rawgit.com/caike/jQuery-Simple-Timer/master/examples/index.html)
63-
6494
## Tests
6595

6696
Open [tests/index.html](https://rawgit.com/caike/jQuery-Simple-Timer/master/tests/index.html)

0 commit comments

Comments
 (0)