<script type='text/javascript' src='../js/jquery.js'></script>
<script type='text/javascript' src='../js/jqueryTimers.js'></script>
<script type='text/javascript'>
jQuery(function($) {
$(this).everyTime(500, "countTimer", function() {
$("#hourCount").css("color", "white");
$("#hourCount").css("font-size", "25px");
$("#minCount").css("color", "white");
$("#minCount").css("font-size", "25px");
$("#secCount").css("color", "white");
$("#secCount").css("font-size", "25px");
var now = new Date();
//var dateCount = 5 - now.getDate();
var hourCount = 23 - now.getHours();
var minCount = 59 - now.getMinutes();
var secCount = 60 - now.getSeconds();
if ( secCount < 10 ) {
secCount = '0' + secCount;
}
if ( secCount == 60 ) {
secCount = '00';
}
if ( minCount < 10 ) {
minCount = '0' + minCount;
}
if ( hourCount < 10 ) {
hourCount = '0' + hourCount;
}
$('#secCount').text(secCount);
$('#minCount').text(minCount);
$('#hourCount').text(hourCount);
})
});
</script>
<!-- 현재 남은시간 표시 -->
<div class="time z">
<div class="hour z"><span id="hourCount"></span></div>
<div class="min z"><span id="minCount"></span></div>
<div class="sec z"><span id="secCount"></span></div>
</div>
<!-- 현재 남은 시간 표시 -->
'jquery' 카테고리의 다른 글
레이어팝업 (0) | 2013.07.15 |
---|---|
쇼핑몰 옵션에다 재고 추가하기!! (0) | 2013.06.19 |
jquery size() 뭐하는녀석이냐! (0) | 2013.06.19 |