Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not a drop in replacement for .animate(); .stop(), among other things, doesn't work with it #232

Open
sadtaco opened this issue Aug 21, 2015 · 3 comments

Comments

@sadtaco
Copy link

sadtaco commented Aug 21, 2015

The details of it make it sound like a drop in replacement for .animate() but there are a number of issues I found that make it not.

with .animate() if you call .stop(true) it will drop all current animations on the element.

scrollTop: and some other properties also aren't valid for .transition()

@milosdjakonovic
Copy link

"sound like" differs from "is".

You can't use $.fn.transition() as drop-in replacement for $.fn.animate(). It was not a design goal of this project, as far as I know.

True for .stop() but you can stop transition easily with saving transitioning property in at-the-moment state and, in same time setting $(element).css({ transition: 'all 0ms' }) which cuts off transition immediately.

You're absolutely right for not being able to use this lib for scrollTop - scrollTop is document property and not node style value.

@br4nnigan
Copy link

options handling is also different

while it is the syntax for .transition you can't .animate({ x: 0, duration: 500 }) but you have to provide a second object as an argument

not sure why this is different in the first place

@baijunjie
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants