While the countdown is running, it is considered to be in an active state. When the countdown reaches the specified date/time, it enters the elapsed state.
When the countdown is elapsed, you may wish to show some text, or show completely different content. This is possible by employing the data-active-state
and data-elapsed-state
divs.
Wrap your countdown elements and labels in a data-active-state
div and they will be hidden when the countdown reaches it's elapsed state.
The data-elapsed-state
div will then be shown.
<div class="col-12" data-countdown-date="2019/08/06" data-detailed>
<div data-active-state>
<span data-days></span>
<span data-days-label data-format="%!d:día,días;"></span>
<span data-hours></span>
<span data-hours-label></span>
<span data-minutes></span>
<span data-minutes-label></span>
<span data-seconds></span>
<span data-seconds-label></span>
</div>
<div data-elapsed-state class="d-none">
<h3> This will show when the countdown is elapsed</h3>
</div>
</div>
The data-elapsed-state
div requires class d-none
. When the countdown reaches its elapsed state, this class is removed and d-none
is added to the data-active-state
div.