JQuery Clock

Developer
Size
2,413 Kb
Views
14,168

How do I make an jquery clock?

What is a jquery clock? How do you make a jquery clock? This script and codes were developed by WebSonick on 15 October 2022, Saturday.

JQuery Clock Previews

JQuery Clock - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>jQuery Clock</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="time"></div>
<ul class="clock"> <li class='hours dial'></li> <li class='minutes dial'></li> <li class='seconds dial'></li>
</ul> <script src="js/index.js"></script>
</body>
</html>

JQuery Clock - Script Codes CSS Codes

@import url(https://fonts.googleapis.com/css?family=PT+Mono); body, html { width: 100%; height: 100%; padding: 0; margin: 0; background-color: #c2cbcc;
}
.clock { list-style: none; margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; position: relative;
}
.clock li { display: block; height: 10px; width: 10000px; position: absolute; top: calc(50% - 5px); left: calc(50% - 5000px); box-sizing: border-box; border-width: 1px 0; border-style: solid;
}
.clock li:after { content:""; position: absolute; top: -1px; left: 50%; height: 10px;
}
.clock .hours { border-color: #eb472a;
}
.clock .hours:after { width: 150px; background-color: #eb472a;
}
.clock .minutes { border-color: #4ba6af;
}
.clock .minutes:after { width: 200px; background-color: #4ba6af;
}
.clock .seconds { height: 5px; border-color: #727f80; top: calc(50% - 5px/2);
}
.clock .seconds:before { content:""; position: absolute; width: 25px; height: 25px; top: -10px; left: calc(50% - 10px); background-color: #727f80; border-radius: 5px; z-index: 3;
}
.clock .seconds:after { height: 5px; width: 250px; background-color: #727f80;
}
.time { position: absolute; height: 100%; width: 100%; top: 0; left: 0; font-size: 300px; color: #a6a8a8; display: flex; align-items: center; justify-content: center; z-index: 0; font-family:'PT Mono', sans-serif;
}
@media only screen and (min-device-width: 320px) and (max-device-width: 568px) and (orientation: portrait) { .time { font-size: 200px; }
}
@media only screen and (min-device-width: 320px) and (max-device-width: 568px) and (orientation: landscape) { .time { font-size: 200px; }
}

JQuery Clock - Script Codes JS Codes

;
(function () { "use strict"; function update() { window.requestAnimationFrame(update); var now = new Date(); var time = { "hours": 360 * (now.getHours() % 12 + now.getMinutes() / 60) / 12 - 90, "minutes": 360 * (now.getMinutes() + now.getSeconds() / 60) / 60 - 90, "seconds": 360 * (now.getSeconds() + now.getMilliseconds() / 1000) / 60 - 90, }; for (var i in time) { document.querySelector("." + i).style.webkitTransform = "rotate(" + time[i] + "deg)"; } document.querySelector(".time").innerText = now.toTimeString().split(" ")[0]; } window.requestAnimationFrame(update);
})();
JQuery Clock - Script Codes
JQuery Clock - Script Codes
Home Page Home
Developer WebSonick
Username WebSonick
Uploaded October 15, 2022
Rating 3
Size 2,413 Kb
Views 14,168
Do you need developer help for JQuery Clock?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

WebSonick (WebSonick) Script Codes
Create amazing Facebook ads with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!