Skip to content

Queues - Erica Case - Digital clock #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ body {
#clock {
height: 100px;
width: 800px;
margin: auto;
margin: 10px;
position: absolute;
top: 0; left: 0; bottom: 0; right: 0;
padding-top: 70px;
Expand Down
30 changes: 19 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<title>Clock Tower</title>
<meta charset="utf-8">
<link href="index.css" media="screen" rel="stylesheet" type="text/css"/>
</head>

<body>
<div id='clock'></div>
</body>
</html>
<head>
<title>Clock Tower</title>
<meta charset="utf-8">
<link href="index.css" media="screen" rel="stylesheet" type="text/css"/>
</head>

<body>
<h1> Is it time for fun? </h1>
<div id="clock"> </div>

<script
src="https://code.jquery.com/jquery-3.2.1.js"
integrity="sha256-DZAnKJ/6XZ9si04Hgrsxu/8s717jcIzLy3oi35EouyE="
crossorigin="anonymous"></script>

<script src="index.js"></script>
<script src="index.js"></script>

</body>

</html>
15 changes: 14 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
// Your code here
// console.log("TEST, TEST");
$(document).ready(function() { // anonymous function

console.log("ANOTHER TEST");

var getTime = function(){
console.log("Hey I'm in a clock");
timenow = $('<div id = "clock" >' + new Date() + '</div>');
$('#clock').replaceWith(timenow);
};


var myTimer = setInterval(getTime, 1000);
});