Home > Net >  Redirect to another index when the animation is finished
Redirect to another index when the animation is finished

Time:09-30

i want to redirect to another index when welcome animation is finished

i think this is the answer

if .ml11 opacity == 0 
redirect new page

but I couldn't do it because I don't know exactly please help im new

here is my all code: https://jsfiddle.net/veuxx/ekvjhf7x/

CodePudding user response:

You can use this

setTimeout(10000);  //10 seconds in milliseconds here you add time
window.location.replace("./file-what-do-you-need-redirect.html");

And maybe you cantg use this

function stateChange(newState) {
    setTimeout(function () {
        if (newState == -1) {
            alert('VIDEO HAS STOPPED');
        }
    }, 5000);
}

CodePudding user response:

const animated = document.querySelector('.animated');

animated.addEventListener('animationend', () => {
  window.location.replace(url);
});
  • Related