With default options:
$('#time').chrony({ hour: 1, minute: 2, second: 3 });
<div id="time"></div>
<div id="time"></div>
With callback option:
$('#callback').chrony({
second: 15,
finish: function() {
this.html('Finished!');
}
});
<div id="callback"></div>
second: 15,
finish: function() {
this.html('Finished!');
}
});
<div id="callback"></div>
With blink option:
$('#blink').chrony({ minute: 10, blink: true });
<div id="blink"></div>
<div id="blink"></div>
With text format:
$('#text').chrony({ text: '1:20:30' });
<div id="text"></div>
<div id="text"></div>
With custom alert:
$('#alert').chrony({ seconds: 3670, alert: { color: '#DDD', hour: 1, minute: 1, second: 1 } });
<div id="alert"></div>
- When you not especify the attribute hour, minute or second the default value is zero (0) for each one;<div id="alert"></div>
- When you not especify the attribute color, the default value is red '#F00'.
With auto adjusted seconds:
$('#seconds').chrony({ seconds: 70 });
<div id="seconds"></div>
<div id="seconds"></div>
With auto adjusted minutes:
$('#minutes').chrony({ minutes: 70 });
<div id="minutes"></div>
<div id="minutes"></div>
With auto adjusted hours:
$('#hours').chrony({ hours: 70 });
<div id="hours"></div>
- The max time will be setted to 23:59:59.<div id="hours"></div>
With custom decrement:
$('#decrement').chrony({ decrement: 2 });
<div id="decrement"></div>
<div id="decrement"></div>
Default options:
blink: false
Enables the colon blink.
alert: { second: 10 }
Attributes color, hour, minute and second to configure the alert.
blinkTime: 130
Time spent to blink the colon.
finish: undefined
Callback function to be executed when the time ends.
decrement: 1
Number of seconds used to decrement the time.
hour: 0
Number of hours initial.
hours: undefined
Number of hours initial auto adjusted to max if needed.
minute: 0
Number of minutes initial.
minutes: undefined
Number of minutes initial auto adjusted to hour if needed.
second: 0
Number of seconds initial.
seconds: undefined
Number of seconds initial auto adjusted to minute if needed.
text: undefined
Time written out in full using the following mask: HH:mm:ss.