Open thiscodeworks opened 6 years ago
Event trigger should count with settings in data-aos-delay or there should be option, now you need to call something like
document.addEventListener('aos:in:number', ({ detail }) => { var timeout = $(detail).attr("data-aos-delay"); setTimeout(function() { console.log('animated in', detail); }, timeout); });
Event is triggered without delay that cause Javascript code is running before actual animation happend - element is not showed but javascript thing is already happend
Good catch @thiscodeworks !
Np, btw the lister have problem in IE11 .. I rewrite it to basic jqurey $(document).on('aos:in:number', function(ev) { var element = ev.detail; });
$(document).on('aos:in:number', function(ev) { var element = ev.detail; });
This is:
Specifications
Expected Behavior
Event trigger should count with settings in data-aos-delay or there should be option, now you need to call something like
document.addEventListener('aos:in:number', ({ detail }) => { var timeout = $(detail).attr("data-aos-delay"); setTimeout(function() { console.log('animated in', detail); }, timeout); });
Actual Behavior
Event is triggered without delay that cause Javascript code is running before actual animation happend - element is not showed but javascript thing is already happend