Skip to content

Instantly share code, notes, and snippets.

@speier
Created October 24, 2013 19:58
Show Gist options
  • Save speier/7143927 to your computer and use it in GitHub Desktop.
Save speier/7143927 to your computer and use it in GitHub Desktop.
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