Claudio
Claudio

Reputation: 904

Scroll to anchor after CSS animation?

I have an CSS animation like this:

@-webkit-keyframes flip {
0% {opacity:1;}
100% {opacity: 0;} //This could be 90%
//And here could be frame for 100% which would scroll it down.
}

#headercover {
    -webkit-animation-name:flip;
-webkit-animation-duration:3s;
-webkit-animation-timing-function:ease;
-webkit-animation-delay:1s;
-webkit-animation-iteration-count:1;
-webkit-animation-play-state:running;
-webkit-animation-fill-mode: forwards;

I'd want the page to scroll down to an anchor, after the last frame of the animation. I'm not really experienced in jQuery or JavaScript, so could you help me out?

See the site: HERE

Upvotes: 0

Views: 198

Answers (1)

subZero
subZero

Reputation: 5176

setTimeout(function(){
    $('html, body').animate({
        scrollTop: $("#elementtoScrollToID").offset().top
    }, 2000);
}, 3000); // wait 3000 ms 

Upvotes: 1

Related Questions