# Animation doesn't load properly on click

**URL:** https://forum.lottiefiles.com/t/animation-doesnt-load-properly-on-click/2523
**Category:** Lottie in Web
**Created:** [March 31, 2022, 3:03pm UTC](https://forum.lottiefiles.com/t/animation-doesnt-load-properly-on-click/2523 "2022-03-31T15:03:12Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![enzeehan](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.lottiefiles.com/enzeehan/32/1810_2.png) [@enzeehan](https://forum.lottiefiles.com/u/enzeehan)
#### Post date: [March 31, 2022, 3:03pm UTC](https://forum.lottiefiles.com/t/animation-doesnt-load-properly-on-click/2523/1 "2022-03-31T15:03:13Z")

</div>

Hello Lottie community 😃

We used Lottie animation embedded in our login page.  
[https://login.lunalabs.io/login/](https://login.lunalabs.io/login/)

Depending on the toggle button, the animation on the right side changes.  
But it’s not loading the animation properly on the first transition. After you click the first time, it works fine.  
Has anyone faced the same issue before?

---

<div class="post-metadata">

### Author: ![irbypace](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.lottiefiles.com/irbypace/32/3165_2.png) [@irbypace](https://forum.lottiefiles.com/u/irbypace)
#### Post date: [March 31, 2022, 6:14pm UTC](https://forum.lottiefiles.com/t/animation-doesnt-load-properly-on-click/2523/2 "2022-03-31T18:14:15Z")

</div>

What it looks like to me is that it’s having to load on that first click and then once’s it’s loaded it smoothly transitions properly. I would got to the file (After Effects) and see if you can simplify the layers, make sure you’re using Shape layers over Ai layers, etc.
