diff --git a/index.html b/index.html index 191d3cc..33d5066 100644 --- a/index.html +++ b/index.html @@ -7,8 +7,14 @@ -
+
+

Local Time:

+
+ + + - - diff --git a/index.js b/index.js index 877a3aa..879ca34 100644 --- a/index.js +++ b/index.js @@ -1 +1,13 @@ // Your code here +$(document).ready(function() { + var startTime = new Date(Date.now()).toLocaleTimeString(); + $("#clock").append('

' + startTime + '

'); + + var displayTime = function () { + var nowTime = new Date(Date.now()).toLocaleTimeString(); + $('p').replaceWith('

' + nowTime + '

'); + }; + + var changeTime = setInterval(displayTime, 1000); + +});