Christmas Countdown

Developer
Size
2,133 Kb
Views
4,048

How do I make an christmas countdown?

Countdown of days until Christmas, using javascript.. What is a christmas countdown? How do you make a christmas countdown? This script and codes were developed by Dave DeHaan on 04 January 2023, Wednesday.

Christmas Countdown Previews

Christmas Countdown - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Christmas Countdown</title> <link rel="stylesheet" href="css/style.css">
</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> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Christmas Countdown - Script Codes CSS Codes

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;
}

Christmas Countdown - Script Codes JS Codes

var countdown = {	month	: 12,	day	: 25,	year	: 2016,
};
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);
Christmas Countdown - Script Codes
Christmas Countdown - Script Codes
Home Page Home
Developer Dave DeHaan
Username davedehaan
Uploaded January 04, 2023
Rating 3
Size 2,133 Kb
Views 4,048
Do you need developer help for Christmas Countdown?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Dave DeHaan (davedehaan) Script Codes
Create amazing video scripts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!