This is a timer just for fun :) and enjoying Javascript
- Add this code in script tag :)
- Input value in simpleTimer function base this format : YYY-MM-DDTHH:MM:SS
<script src="timer.js"></script>
<script>
simpleTimer("2019-07-14T20:12:00"); // YYY-MM-DDTHH:MM:SS
</script>
I created function with $ we can find elements by tagName, className and ID.
$('span', "style.color", 'red');
$('.title', "style.color", 'blue');
$('#test', "style.color", 'pink');
$("#test").style.color = "green";
$("#anotherID #test").style.color = "green";
$("#anotherID #test", "style.color", 'pink');
Nested Access to element:
$('#anotherID #testAgain .hi', "style.color", "green"); // Tags with "hi" ClassName
$('#anotherID .section .content',"style.border", "1px solid #ccc");
$('#anotherID #testAgain .hi'); // output is HTMLCollection