Just wondering if anyone has any idea how I can Prerender Animations in jQuery. Basically the first time I run an animation it is jerky… but from then on when I run it, it runs perfectly smooth…
Any ideas?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There’s no way (that I know of) to do what you’re asking.
Javascript animations are done by transitioning from one CSS value to another (like margin, top, width, height, etc). I don’t really see how you could “pre-render” this. The only thing I can think of is pre-defining the sequence of values which will be applied in CSS (if you’re using complicated exponential or trigonometric functions easing). Even then, it’s not something you would do (necessarily) with jQuery.
Do you have an example of your jerky animation that suddenly runs smoother?