I wanted to show a countdown on my webpage. So I searched across the internet to find the solution. I found a jQuery library - Countdown.js useful for this. Here I am sharing the script used for creating the default countdown of this jQuery library.
<head>
<title>jQuery Countdown</title>
<link rel="stylesheet" href="Styles/jquery.countdown.css"></link>
<style type="text/css">
#defaultCountdown { width: 240px; height: 45px; }
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="Scripts/jquery.plugin.js"></script>
<script type="text/javascript" src="Scripts/jquery.countdown.js"></script>
<script type="text/javascript">
$(function () {
$('#defaultCountdown').countdown({ until: +600});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="defaultCountdown">
</div>
</form>
</body>
Put the above script inside the html tag of your webpage and it will generate a default countdown for 10 mins. Here is the screenshot for the default screenshot -
Comments
Post a Comment