{"id":34967,"date":"2021-01-14T17:23:21","date_gmt":"2021-01-14T17:23:21","guid":{"rendered":"https:\/\/www.myedme.com\/login\/?p=34967"},"modified":"2021-01-23T16:52:41","modified_gmt":"2021-01-23T16:52:41","slug":"timer","status":"publish","type":"post","link":"https:\/\/myedme.com\/login\/timer\/","title":{"rendered":"Timer"},"content":{"rendered":"\n<!-- Display the countdown timer in an element -->\n<div class=\"col-sm-12\">\n    <img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.navalengineers.org\/portals\/16\/Events\/TSS21\/Virtual_TSS21_logo_long.jpg?w=980\" style=\"width: 100%;\">\n<\/div>\n<div class=\"row\">\n    <div style=\"padding-top: 8%; width:70%; float: left;\">\n        <img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.myedme.com\/login\/wp-content\/uploads\/2021\/01\/TSS-3corp_New.png?w=1&#038;ssl=1\" id=\"imageRotator\"  00%=\"\">\n    <\/div>\n    <div style=\"width:30%; padding-top: 18%;  float: left;\">\n        <p style=\"text-align: right; float: left;\">&nbsp;&nbsp;&nbsp;Event will begin in&nbsp;<\/p>\n        <p style=\"text-align: right; float: left; color: seagreen;\" id=\"demo\"><\/p>\n        <p style=\"text-align: right; float: left;\">.<\/p>\n    <\/div>\n<\/div>\n<div class=\"col-sm-12\">\n    <h1> <br>\n        <br>\n        <br>\n        <br>\n        <br><\/h1>\n<\/div>\n<script>\n    \/\/ Set the date we're counting down to\n    var countDownDate = new Date(\"Jan 23, 2021 11:57:00\").getTime();\n\n    \/\/ Update the count down every 1 second\n    var x = setInterval(function() {\n\n        \/\/ Get today's date and time\n        var now = new Date().getTime();\n\n        \/\/ Find the distance between now and the count down date\n        var distance = countDownDate - now;\n\n        \/\/ Time calculations for days, hours, minutes and seconds\n        var days = Math.floor(distance \/ (1000 * 60 * 60 * 24));\n        var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) \/ (1000 * 60 * 60));\n        var minutes = Math.floor((distance % (1000 * 60 * 60)) \/ (1000 * 60));\n        var seconds = Math.floor((distance % (1000 * 60)) \/ 1000);\n\n        if (seconds > 9) {\n            document.getElementById(\"demo\").innerHTML = minutes + \":\" + seconds;\n        }\n        if (seconds < 10) {\n            document.getElementById(\"demo\").innerHTML = minutes + \":0\" + seconds;\n        }\n        if (seconds == 0) {\n            document.getElementById(\"demo\").innerHTML = minutes + \":00\";\n  if (minutes ==0) {\n        document.getElementById(\"demo\").innerHTML = \"Now!\";\n}\n        }\n        if (minutes < 5) {\n            document.getElementById(\"imageRotator\").src = \"https:\/\/www.myedme.com\/login\/wp-content\/uploads\/2021\/01\/TSS-3corp_ad.png\";\n        }\n        if (minutes < 4) {\n            document.getElementById(\"imageRotator\").src = \"https:\/\/www.myedme.com\/login\/wp-content\/uploads\/2021\/01\/TSStext1.png\";\n        }\n        if (minutes < 3) {\n            document.getElementById(\"imageRotator\").src = \"https:\/\/www.myedme.com\/login\/wp-content\/uploads\/2021\/01\/TSStex2.png\";\n        }\n        if (minutes < 2) {\n            document.getElementById(\"imageRotator\").src = \"https:\/\/www.myedme.com\/login\/wp-content\/uploads\/2021\/01\/TSS-3corp_New.png\";\n        }\n        if (minutes < 1) {\n                document.getElementById(\"imageRotator\").src = \"https:\/\/www.myedme.com\/login\/wp-content\/uploads\/2021\/01\/TSStext1.png\";\n            if (seconds < 40) {\n                document.getElementById(\"imageRotator\").src = \"https:\/\/www.myedme.com\/login\/wp-content\/uploads\/2021\/01\/TSStex2.png\";\n            }\n            if (seconds < 20) {\n                document.getElementById(\"imageRotator\").src = \"https:\/\/www.myedme.com\/login\/wp-content\/uploads\/2021\/01\/TSS-3corp_New.png\";\n            }\n        }\n\n\n        \/\/ Display the result in the element with id=\"demo\"\n        \/\/document.getElementById(\"demo\").innerHTML = days + \"d \" + hours + \"h \" + minutes + \"m \" + seconds + \"s \";\n\n        \/\/ If the count down is finished, write some text\n        if (distance < 0) {\n            clearInterval(x);\n            document.getElementById(\"demo\").innerHTML = \"a moment\";\n        }\n    }, 1000);\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;&nbsp;&nbsp;Event will begin in&nbsp; .<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-34967","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/myedme.com\/login\/wp-json\/wp\/v2\/posts\/34967","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myedme.com\/login\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myedme.com\/login\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myedme.com\/login\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/myedme.com\/login\/wp-json\/wp\/v2\/comments?post=34967"}],"version-history":[{"count":5,"href":"https:\/\/myedme.com\/login\/wp-json\/wp\/v2\/posts\/34967\/revisions"}],"predecessor-version":[{"id":35140,"href":"https:\/\/myedme.com\/login\/wp-json\/wp\/v2\/posts\/34967\/revisions\/35140"}],"wp:attachment":[{"href":"https:\/\/myedme.com\/login\/wp-json\/wp\/v2\/media?parent=34967"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myedme.com\/login\/wp-json\/wp\/v2\/categories?post=34967"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myedme.com\/login\/wp-json\/wp\/v2\/tags?post=34967"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}