Simple jQuery Countdown
This is a very simple jQuery based countdown timer. You don't need to write any additional javascript code to make this plugin work.
Steps to install and setup plugin
- Include jquery js file, countdown js and css files in your HTML file
<link rel="stylesheet" type="text/css" href="countdown.css" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script type="text/javascript" src="countdown.js"></script>
- Create an empty div add add class countdown
- Create an attribute data-date and provide date value in YYYY-MM-DD format
<div class='countdown' data-date="2019-05-01"></div>
- You can also mention end time of the countdown. Create an attribute data-time and provide time value in HH:MM format. HH is the 24 hour format.
<div class='countdown' data-date="2019-05-01" data-time="18:30"></div>
- That's it. The countdown is start working.