jquery-remote-clock

1.0.1 • Public • Published

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);
    }
});

Package Sidebar

Install

npm i jquery-remote-clock

Weekly Downloads

2

Version

1.0.1

License

MIT

Last publish

Collaborators

  • angyvolin