Hi
I have a countdown made with wix code.
I am looking to accomplish,when the countdown finishes will redirect customers to another page.
I know that I need to use wix location but not sure which part of the countdown to take.
Ideally i see a solution with if the countdown finish than redirect to location /page-name.
Anyone help how could I do it please.
Here is the link to the test site https://etsyyy.wixsite.com/workfromhome
and here is the code I used(not my own code,got it from the forum)
Thank you
$w.onReady(function () {
$w("#box6").hide();
var segun;
var La_fecha;
var La_fecha_total;
var segundos;
var dias;
var horas;
var minutos;
let fadeOptions =
{
"duration": 2500,
"direction": "top"
};
$w("#box6").show("flip", fadeOptions);
function mundial()
{
La_fecha = new Date();
La_fecha_total = new Date (" Jun 14 10:00:00:2018");
segundos = (La_fecha_total - La_fecha) / 1000;
dias = parseInt(segundos / 86400);
segundos = segundos % 86400;
horas = parseInt(segundos / 3600);
segundos = segundos % 3600;
minutos = parseInt(segundos / 60);
segun = parseInt(segundos % 60);
$w("#text11").text = String(dias);
$w("#text12").text = String (horas);
$w("#text13").text = String (minutos);
$w("#text14").text = String (segun);
}
setInterval(function()
{
mundial();
}, 1000);
});
function myFunction()
{
setInterval(function()
{
if ($w("#text21").hidden)
{
$w("#text21").show();
}
else if ($w("#text21").isVisible)
{
$w("#text21").hide();
}
else
{
$w("#text21").show();
}
}, 500);
}
myFunction();