flip clock callbacks stop - it does not work for me

0

Dear I'm using flipclock for a regressive counter, what I try is that when you reach the indicated time, the counter will make a callback stop and hide the div from the counter and show another div with a message, when I made the example with only minutes It works but I need a date, and it's not working. they could shake my hand, thank you, I leave the codes I use.

$(document).ready(function() {
    iniciarTemporizador();
});

function iniciarTemporizador() {

    var fechaFinal = new Date(2018, 2, 15, 12, 59, 59);
    var fechaHoy = new Date();

    var diferenciaMilisegundos = fechaFinal.getTime() - fechaHoy.getTime();
    var diferenciaSegundos = (diferenciaMilisegundos / 1000);

    var clock = $(".clock").FlipClock({
        clockFace: 'DailyCounter',
        autoStart: false,
        callbacks: {
            stop: function() {
                
                $('.clock').fadeOut();
                $('.nuevo-mensaje').fadeIn();

            }
        }
    });

    clock.setTime(diferenciaSegundos);
    clock.setCountdown(true);
    clock.start();

}
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/flipclock/0.7.8/flipclock.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flipclock/0.7.8/flipclock.min.css">

<div class="clock"></div>
<div class="nuevo-mensaje" style="display:none;">Contenido del nuevo mensaje!!!</div>
    
asked by Sixto Mujica 15.03.2018 в 13:30
source

0 answers