jquery-remote-clock
v1.0.1
Published
Turns given div element into simple clock displaying remote time.
Downloads
11
Maintainers
Readme
jquery-remote-clock
Turns given div element into simple clock displaying remote time.
basic usage
<div class="clock-holder"></div>
$('.clock-holder').remoteClock({
url: '/time'
});
change sync interval
$('.clock-holder').remoteClock({
url: '/time',
syncInterval: 30000
});
customize widget template
$('.server-time-clock').remoteClock({
url: '/time',
template: '<i class="fa fa-clock-o" aria-hidden="true"></i> <span class="time">88:88:88</span>'
});
use custom time parser
$('.server-time-clock').remoteClock({
url: '/time',
parser: function (data) {
return Date.parse(data.time);
}
});