Skip to content

Instantly share code, notes, and snippets.

@speier

speier/clock.js

Created Oct 24, 2013
Embed
What would you like to do?
dead simple js clock (using moment.js)
function displayTime() {
var time = moment().format('HH:mm:ss');
$('#clock').html(time);
setTimeout(displayTime, 1000);
}
$(document).ready(function() {
displayTime();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.