"countdown timer"
Bootstrap 3.1.0 Snippet by muhittinbudak

<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Strait"> <div class="container" style="font-family: 'Strait', sans-serif;"> <div class="row"> <center><h2>Countdown timer</h2></center> <!-- zaman başlangıç --> <div id="zamanpanel" style="display:block;font-weight:bold;color:#000;" > <!-- :block --> <center>Güneşin Batmasına Kalan Süre</center> <center style="margin-bottom:15px" id="zamanbaslik">Geri Sayım</center> <center><span style="background-color:#FFF133;color:#000;font-size:18px;" class="label label-default" id="kalanzaman" >.</span></center> </div><!-- zamanpanel bitiş --> </div> </div>
$(document).ready(function(){ // zamanı girin var countDownDate = new Date("may 14, 2026 18:00:00").getTime(); // Update the count down every 1 second var x = setInterval(function() { // Get today's date and time var now = new Date().getTime(); // Find the distance between now and the count down date var distance = countDownDate - now; // Time calculations for days, hours, minutes and seconds var days = Math.floor(distance / (1000 * 60 * 60 * 24)); var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); var seconds = Math.floor((distance % (1000 * 60)) / 1000); // Output the result in an element with id="kalanzaman" let Mgun = (days == 0) ? "" : days + " gün "; let Msaat = (hours == 0) ? "" : hours + " saat "; let Mdak = (minutes == 0) ? "" : minutes + " dak "; let Msan = (seconds == 0) ? "" : seconds + " san"; var Mdonen = Mgun + Msaat + Mdak + Msan; // Output the result in an element with id="kalanzaman" document.getElementById("kalanzaman").innerHTML = Mdonen; // If the count down is over, write some text if (distance < 0) { clearInterval(x); //document.getElementById("kalanzaman").innerHTML = "zaman bitti."; $("#zamanpanel").attr("style", "display:none"); //$("#zamanbaslik").text("Nema"); //$("#kalanzaman").css("display","none"); //$("#kalanzaman").text("77.1").slideDown(); } }, 1000); });

Related: See More


Questions / Comments: