Animate Element on Load

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Animate Element on Load



I want to animate something after the entire page loads. I'm using jQuery and UI Kit right now.



So far I have:


$(window).on('load',function()
UIkit.scrollspy('menus','cls:uk-animation-slide-top');
);





How is this working for you so far?
– LexJacobs
Aug 8 at 2:42




1 Answer
1



Alright I've played around and I got it to do what I want however the animation acts a little differently. Here's what I've got:


$(window).on('load',function()
$('#loading').fadeOut(500); // Hide loading screen
UIkit.scrollspy('.menus',cls:'uk-animation-slide-top',delay:500); // Animate top menus
);



So when the page fully loads, the loading screen disappears and then the element animates. Perfect!



However, the element is a div tag containing two navbars. For some reason when I animate it this way it sticks them both to the very top instead of one on top of the other. You can see it at http://culturehog.com. I don't know why animating it this way would affect the sticky; when I add the animation directly to the element it loads fine.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard