Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ $("#div-id").timer({
repeat: {Bool}, // If duration is set, `callback` will be called repeatedly
format: {String}, // Format to show time in
editable: {Bool} // If click and edit time is enabled
hidden; {Bool} // If true, the timer is not displayed in the selected item.
});
```

Expand Down
4 changes: 3 additions & 1 deletion src/Timer.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ function Timer(element, config) {
Timer.prototype.start = function() {
if (this.state !== Constants.TIMER_RUNNING) {
utils.setState(this, Constants.TIMER_RUNNING);
this.render();
if (this.config.hidden !== true) {
this.render();
}
this.intervalId = setInterval(utils.intervalHandler.bind(null, this), this.config.updateFrequency);
}
};
Expand Down