Created
October 24, 2013 19:58
-
-
Save speier/7143927 to your computer and use it in GitHub Desktop.
dead simple js clock (using moment.js)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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