I create a Periodic Table Apps and I create an animation where Element move from initial position to center of window, but transitions are Jerky. To do this I Create a Copy of this Element (clicked) and change is Class.
Animation are made from CSS (updating class which has other Left/Top/Translate values) and few are coming from JS (for example : x.style.left = y)
I also tried to create CSS ROOT values and update them with JS, but same problem. I Also tried to remove maximum JS which is not necessary. Tried Request Animation Frame "everywhere" too.
I am not using Plugins, it's a VanillaJS App made With Isotope. Do you know why is this laggy ? Are there too many elements in my DOM ? Or Maybe i Am doing wrong ? Love this kind of transition, so I really Want to know how i can optimise it !
Here is a Link for my Project JavaScript (Might be updated frequently).