| 
				Зациклить таймер.
			 Добрый день. Использую вот этот таймер:<style>
 
 #bigtimerblacklabels { width: 460px; margin: 0 auto; }
 #clock-ticker { display: block; margin-bottom: 15px;}
 #clock-ticker .block { position: relative; color: #fff; font-weight: bold; float: left; margin-right: 22px; }
 #clock-ticker .block .flip-top { width: 88px; height: 39px; line-height: 75px; font-size: 55px; background: url('img/flip-top.png') no-repeat; text-align: center; }
 #clock-ticker .block .flip-btm { width: 88px; height: 40px; background: url('img/flip-btm.png') no-repeat; text-align: center; }
 #clock-ticker .block .label { color: #000; font-weight: bold; font-size: 14px; text-transform: uppercase; width: 88px; line-height: 35px; text-align: center; font-family: "Calibri", Arial, sans-serif;}
 </style>
 
 <div id="bigtimerblacklabels">
 <div id="clock-ticker" class="clearfix">
 <div class="block">
 <span class="flip-top" id="numdays">8</span>
 <span class="flip-btm"></span>
 <footer class="label">Дней</footer>
 </div>
 
 <div class="block">
 <span class="flip-top" id="numhours">14</span>
 <span class="flip-btm"></span>
 <footer class="label">Часов</footer>
 </div>
 
 <div class="block">
 <span class="flip-top" id="nummins">34</span>
 <span class="flip-btm"></span>
 <footer class="label">Мин</footer>
 </div>
 
 <div class="block">
 <span class="flip-top" id="numsecs">9</span>
 <span class="flip-btm"></span>
 <footer class="label">Сек</footer>
 </div>
 </div>
 </div>
 
 <script type="text/javascript">
 $(document).ready(function(){
 var theDaysBox  = $("#numdays");
 var theHoursBox = $("#numhours");
 var theMinsBox  = $("#nummins");
 var theSecsBox  = $("#numsecs");
 
 var refreshId = setInterval(function() {
 var currentSeconds = theSecsBox.text();
 var currentMins    = theMinsBox.text();
 var currentHours   = theHoursBox.text();
 var currentDays    = theDaysBox.text();
 
 if(currentSeconds == 0 && currentMins == 0 && currentHours == 0 && currentDays == 0) {
 // if everything rusn out our timer is done!!
 // do some exciting code in here when your countdown timer finishes
 
 } else if(currentSeconds == 0 && currentMins == 0 && currentHours == 0) {
 // if the seconds and minutes and hours run out we subtract 1 day
 theDaysBox.html(currentDays-1);
 theHoursBox.html("23");
 theMinsBox.html("59");
 theSecsBox.html("59");
 } else if(currentSeconds == 0 && currentMins == 0) {
 // if the seconds and minutes run out we need to subtract 1 hour
 theHoursBox.html(currentHours-1);
 theMinsBox.html("59");
 theSecsBox.html("59");
 } else if(currentSeconds == 0) {
 // if the seconds run out we need to subtract 1 minute
 theMinsBox.html(currentMins-1);
 theSecsBox.html("59");
 } else {
 theSecsBox.html(currentSeconds-1);
 }
 }, 1000);
 });
 </script>
 
 В ручную выставляю в нем дни часы минуты. Подскажите пожалуйста как его зациклить. Мне нужно выставить 24 часа и, чтобы когда они пройдут таймер снова сбросился на ноль и начал по новой отсчет. Реально ли это сделать? Заранее спасибо.
 
			
			
	
			
			
			
			
			
				  |