Search code examples
jquerycountdown

Output the countdown has ended when countdown is zero JS


http://keith-wood.name/countdown.html

I am using this jQuery plugin.

$('#noDays').countdown({
    until: enddate_final, format: 'HMS', compact: true, description: '', timeSeparator: ' : '});

Is what I have and works fine. I wish to output "The countdown has ended" if/when the countdown is 00:00:00.

How can i do this?


Solution

  • See docs on page you posted,

    Tab: Callbacks Example no.3

    using configuration property expiryText

    $('#expireMessage').countdown({
        until: shortly.setSeconds(shortly.getSeconds() + 5.5), 
        expiryText: '<div class="over">It\'s all over</div>'
    });