diff --git a/index.css b/index.css index ec4a909..931ec59 100644 --- a/index.css +++ b/index.css @@ -9,7 +9,7 @@ body { position: absolute; top: 0; left: 0; bottom: 0; right: 0; padding-top: 70px; - font-family: courier, monospace; + font-family: 'Arimo', sans-serif; text-align: center; color: white; font-size: 100px; diff --git a/index.html b/index.html index 191d3cc..fa68522 100644 --- a/index.html +++ b/index.html @@ -11,4 +11,5 @@ + diff --git a/index.js b/index.js index 877a3aa..8843f44 100644 --- a/index.js +++ b/index.js @@ -1 +1,14 @@ -// Your code here +$(document).ready(function() { + var intervalID = window.setInterval(myCallback, 1000); + function myCallback() { + var today = new Date(); + var currentTime = { + currentHour: (today.getHours() > 12 ? (today.getHours() - 12) : today.getHours()), + currentMinute: (today.getMinutes() < 10 ? '0':'') + today.getMinutes(), + currentSecond: (today.getSeconds() < 10 ? '0':'') + today.getSeconds(), + amOrPm: (today.getHours() > 12 ? "pm" : "am") + }; + var currentTime = "Current Time: " + currentTime.currentHour + ":" + currentTime.currentMinute + ":" + currentTime.currentSecond + currentTime.amOrPm; + $('#clock').html(currentTime); + }; +});