Open Louboutin1017 opened 1 year ago
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
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