Countdown
A simple and HTML agnostic date countdown plugin with different countdown options.
How to use?
To add hs.countdown.js
in your page, wrap any block in a parent element with an ID or class and add the same ID or the class in the JS init function of the plugin, set the time data-end-date=""
and data-*-format=""
.
Copy-paste the following <script>
near the end of your pages under JS Implementing Plugins to enable it.
Copy-paste the following <script>
near the end of your pages under JS Space to enable it.
Copy-paste the init function under JS Plugins Init., before the closing </body>
tag, to enable it.
Methods
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-
, as in data-start-date=""
.
Attribute | Description |
---|---|
|
Date from which the time period will be calculated. |
|
Date to which the time period will be calculated. |
|
Display format for years. |
|
Display format for months. |
|
Display format for days. |
|
Display format for hours. |
|
Display format for minutes. |
|
Display format for seconds. |
|
Activates the ability to add SVG-circles around the clock, minutes, seconds, etc. |
|
Adds border-radius for SVG-circles, if data-circles-radius="" is set to true . |
|
Adds border-width for SVG-circles, if data-circles="" is set to true . |
|
Adds fill color for SVG-circles, if data-circles="" is set to true . |
|
Adds background color for SVG-circles, if data-circles="" is set to true . |
|
Adds the postfix to the digital value, if data-circles="" is set to true . |
|
Adds font-size inside the SVG-circles, if data-circles="" is set to true . |
Official Documentation
For more detailed information, see the official documentation: jQuery Countdown documentation.