Event "finish.countdown" dont working
See original GitHub issueHello, I am trying to display an alert on a page that contains 3 countdown. The alert is to be displayed when any of them is finalized. But nothing happens when I use “finish.countdown”. It simply resets the counter. I tested the event “update.countdown” and worked well. I’m missing something? Below is my code. thank you
HTML CODE
<div data-countdown="2015-14-10 09:00:00"></div>
<div data-countdown="2015-14-10 10:00:00"></div>
<div data-countdown="2015-14-10 11:00:00"></div>
JAVASCRIPT CODE
$('[data-countdown]').each(function() {
var $this = $(this), finalDate = $(this).data('countdown');
$this.countdown(finalDate, function(event) {
$this.html(event.strftime('%H:%M:%S'));
});
$(this).on('finish.countdown', function(event){
alert("teste");
});
});
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
jquery countdown event on finish did not show intended html
I have been doing jquery countdown process with two date parameters. But when second date parameters end, the html intended did not show...
Read more >Timer.finish event does not trigger automation - Configuration
The automation can be run manually (obviously) but the timer never triggers it (not when it finishes the end of its countdown, and...
Read more >WHY IS THERE A COUNTDOWN TIMER IN FORTNITE? (THE ...
The new live event is going to be called the end live event because ... the countdown timer for, countdown You are not...
Read more >Show a countdown to an event in your ad
Not everyone can show a countdown to an event in their multimedia ads yet. ... Countdown ends: Select the date and enter the...
Read more >How to Add a Countdown Timer in Your Email - Stripo
Add customizable countdown timers to your emails within just two minutes. ... be somewhat confusing — hard to understand what time exactly the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try not to use the legacy callback with a registered event, the suggested approach is to bind each event one like to handle:
Hello Hilios, I found out what had happened. It was a small mistake I made. The date format was wrong. When I changed the string that shows the counter to show how many days were lacking for the event, I saw that there were still many days. For this reason, the counter back to 23:59:00 when reached 00:00:00. In fact, he was reduced one day to the event. I was using the format: YYYY-DD-MM. But I should have used: YYYY-MM-DD. After correcting this, everything worked properly. Thank enough for their commitment to help me. Thank you so much. Big hug