Arkadaşlar merhaba,
countdownjs.org
Eklenti oldukça işe yarar ve her türlü uygulamanızda kullanabileceğiniz esneklikte.
Kullanan arkadaşlardan ricam
başlangıç tarihini ve hedef tarihi kendimiz belirleyebileceğimiz.
Hedef zamana kadar şu kadar zaman kaldı diye geriye sayan hedef zamanı geçince şu kadar zaman geçti diye devam eden bir şekilde sadeleştirilmiş hali lazım bana.
Sayfanın içinde birden fazla yerde kullanabilmeliyim.
http://countdownjs.org/ Şart değil farklı bir js de olabilir.
Örnek vermek gerekirse
Hedef Zamana gelene kadar geriye doğru
365 days, 2 hours, 16 minutes, and 33 Seconds Kaldı
365 days, 2 hours, 16 minutes, and 32 Seconds Kaldı
365 days, 2 hours, 16 minutes, and 31 Seconds Kaldı
Hedef zamanı geçtikten sonra
0 days, 0 hours, 0 minutes, and 0 Seconds Geçti
0 days, 0 hours, 0 minutes, and 1 Seconds Geçti
0 days, 0 hours, 0 minutes, and 2 Seconds Geçti
Şeklinde
Müsait olup yardımcı olabilirseniz çok sevinirim, şimdiden teşekkürler.
countdown hakkında yardımcı olabilecek ?
4
●623
- 06-08-2014, 15:52:54Bu sayfada anlatılıyor sanki? http://countdownjs.org/readme.htmlAXSOY adlı üyeden alıntı: mesajı görüntüle
- 06-08-2014, 15:58:32Evet işinin ehli ve zamanı olan birisinilbek adlı üyeden alıntı: mesajı görüntüle
demo.html
Countdown.js
haline getirip verecek - 06-08-2014, 16:34:24
<!DOCTYPE HTML> <html lang="en-US"> <head> <meta charset="UTF-8"> <title></title> <link rel="stylesheet" href="style.css" /> <link rel="stylesheet" href="fonts.css" /> <script type="text/javascript" src="Countdown.js" ></script> <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.1.min.js" ></script> </head> <body> <div class="countdown"> <center> <span class="days">00</span> Days <span class="hours">00</span> Hours <span class="minutes">00</span> Minutes <span class="seconds">00</span> Seconds </center> </div> </body> </html>
body { background: #119911 } .countdown { margin: 30px auto; font-family: Arial; color: #333; font-size: 20px; font-weight: bold; } .countdown span { display: inline-block; font-size: 20px; color: #EEE; background: #CC1111; padding: 15px; border-radius: 5px; margin: 0px 3px 0px 7px; }
var countdown = { month : 12, day : 25, year : 2014, }; setInterval(function() { d2 = new Date(countdown.month+'/'+countdown.day+'/'+countdown.year).getTime(); d1 = new Date().getTime(); difference = (d2-d1) / 1000; countdown.days = Math.floor(difference / (60 * 60 * 24)); difference -= (countdown.days * (60 * 60 * 24)); countdown.hours = Math.floor(difference / (60 * 60)); difference -= (countdown.hours * (60 * 60)); countdown.minutes = Math.floor(difference / 60); difference -= (countdown.minutes * 60); countdown.seconds = Math.floor(difference); countdown.days = countdown.days < 10 ? '0' + countdown.days.toString() : countdown.days; countdown.hours = countdown.hours < 10 ? '0' + countdown.hours.toString() : countdown.hours; countdown.minutes = countdown.minutes < 10 ? '0' + countdown.minutes.toString() : countdown.minutes; countdown.seconds = countdown.seconds < 10 ? '0' + countdown.seconds.toString() : countdown.seconds; $('.countdown .days').html(countdown.days); $('.countdown .hours').html(countdown.hours); $('.countdown .minutes').html(countdown.minutes); $('.countdown .seconds').html(countdown.seconds); }, 1000); - 06-08-2014, 20:16:26İlginiz için teşekkür ederim elinize sağlık.
Ancak
Başlangıç ve Bitiş tarihini new Date("October 13, 2014 11:13:00"); şeklinde belirte bilmemiz gerekiyor.
verdiğiniz örneği editleyerek düzenlenebilir bu sorun ama
belirttiğimiz süre aşınca 0 gün 0 ay 0 saat 0 dakika 1 saniye demek yerine
-1 -1 -1 -1 olarak başlıyor
yinede onarmayı deneyeceğim başkarlarının da işine yarayabilir