javascript - Delay new page load until animation is complete -


i'd quick animation of div before leaving page when navigation link clicked. how pull off? having issues completing animating before new page loaded. animation starts page loaded before div can moving.

var el = document.queryselector(".myelement");   el.addeventlistener("animationstart", function() {}, false); el.addeventlistener("animationend", function() {el.onclick = navigateto;}, false); el.addeventlistener("animationiteration", function() {}, false);  el.addeventlistener( 'webkittransitionend',  function( event ) { alert( "finished transition!" ); }, false );  function navigateto() {   location.href=this.href; } 

using css animations

globaleventhandlers.onclick


Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -