jQuery.countdown icon indicating copy to clipboard operation
jQuery.countdown copied to clipboard

Complicated callback..

Open Louboutin1017 opened this issue 3 years ago • 0 comments

Hello Devs,

I'm kind of not sure why the callback and count up function not working.. see my example code.

$(document).ready(function () { "use strict"; // Start countdown $("[data-countdown]").each(function () { var $this = $(this), finalDate = $(this).data("countdown"); $this.countdown(finalDate, function (event) { $this.html(event.strftime("%D days %H:%M:%S")); }); // Callback and countup function if (event.elapsed) { $this.html(event.strftime("After end: <span>%H:%M:%S</span>")); } else { $this.html(event.strftime("To end: <span>%H:%M:%S</span>")); } }); // End });

Thanks for your attention

Louboutin1017 avatar Nov 03 '22 21:11 Louboutin1017