Professional Documents
Culture Documents
Counter
Counter
#clock-ticker {
display: block;
margin-bottom: 15px;
text-align:center;
#clock-ticker .block {
position: relative;
color: #000;
display:inline-block;
text-align: center;
padding:0 8px;
color: #555;
width: 88px;
height: 39px;
line-height: 40px;
font-size: 40px;
text-align: center;
font-weight:700;
color: #888;
font-weight:700;
font-size: 13px;
text-transform: uppercase;
width: 88px;
line-height: 25px;
text-align: center;
.timer-text {
display:none;
text-align: center;
color: #000;
font-size: 14px;
margin-bottom: 20px;
</style>
<div class="timer-text">The sale will be over once the timer hits zero!</div>
<div class="block">
<br/>
<span class="labell">Days</span>
</div>
<div class="block">
<br/>
<span class="labell">Hours</span>
</div>
<div class="block">
<span class="flip-top" id="nummins">0</span>
<br/>
<span class="labell">Minutes</span>
</div>
<div class="block">
<br/>
<span class="labell">Seconds</span>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
var n = d.getDay();
var date;
if (n==0) {
date = 1;
};
if (n==1) {
date = 3;
};
if (n==2) {
date = 2;
};
if (n==3) {
date = 1;
};
if (n==4) {
date = 4;
};
if (n==5) {
date = 3;
};
if (n==6) {
date = 2;
};
var gg=0;
var hh=0;
var ii=0;
if(nsec<0){
nsec=60-d.getSeconds();
gg=1;
}
var nmin = 0-d.getMinutes()-gg;
if(nmin<0){
nmin=60-d.getMinutes()-gg;
hh=1;
if(nhrs<0){
nhrs=24-d.getHours()-hh;
ii=1;
if(ndat<0){
ndat=30+date-d.getDate()-ii;
theSecsBox.html(nsec);
theMinsBox.html(nmin);
theHoursBox.html(nhrs);
theDaysBox.html(ndat);
// 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");
theHoursBox.html(currentHours-1);
theMinsBox.html("59");
theSecsBox.html("59");
} else if(currentSeconds == 0) {
theMinsBox.html(currentMins-1);
theSecsBox.html("59");
} else {
theSecsBox.html(currentSeconds-1);
}, 1000);
});
</script>
<style>
#clock-ticker .block {
position: relative;
color: #000;
font-weight: bold;
float: left;
text-align: center;
width: 25%;
width: 88px;
height: 39px;
line-height: 40px;
font-size: 40px;
text-align: center;
color: #000;
font-weight: bold;
font-size: 14px;
text-transform: uppercase;
width: 88px;
line-height: 25px;
text-align: center;
font-family: "Calibri",Arial,sans-serif;
</style>
<div class="block">
<br/>
<span class="label">Days</span>
</div>
<div class="block">
<br/>
<span class="label">Hours</span>
</div>
<div class="block">
<br/>
<span class="label">Minutes</span>
</div>
<div class="block">
<br/>
<span class="label">Seconds</span>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
var tag = "{{ tag }}".match(/\d+/g);
var gg=0;
var hh=0;
var ii=0;
if(nsec<0){
nsec=60-d.getSeconds();
gg=1;
if(nmin<0){
nmin=60-d.getMinutes()-gg;
hh=1;
nhrs=hour+24-d.getHours()-hh;
ii=1;
if(ndat<0){
ndat=30+12-d.getDate()-ii;
theSecsBox.html(nsec);
theMinsBox.html(nmin);
theHoursBox.html(nhrs);
theDaysBox.html(ndat);
// 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");
theHoursBox.html(currentHours-1);
theMinsBox.html("59");
theSecsBox.html("59");
} else if(currentSeconds == 0) {
theMinsBox.html(currentMins-1);
theSecsBox.html("59");
} else {
theSecsBox.html(currentSeconds-1);
}, 1000);
});
</script>
{% endif %}
{% endfor %}