-
Notifications
You must be signed in to change notification settings - Fork 862
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
.complete is called twice. Before and after a transition #135
Comments
Yep, having the same issue. |
Okay, this bug appears to be a bug of this pull request: #134 |
critical issue.... |
Up vote on this one. |
If you want to be compatible with jQuery animate, you should pass the complete call in the second object parameter
See: |
+1 Since the docs (https://github.com/rstacruz/jquery.transit#animating---fntransition) explicitly state that you can define the complete-callback within the first object, I wasn't hesitating to do exactly that, which resulted in the callback being called twice. However, putting the complete-callback into the second object just as hannesjohansson pointed out above, does indeed remedy this issue. I love adding everything to the first object though, because it looks much cleaner ;) |
I agree that it is cleaner but it completely breaks compatibility with jquery.animate. If you put the callback inside of the first object in animate it doesn't run, so the documentation for transit is kind of flawed. Example of jQuery not accepting a callback function in the first object param: |
Following semver, no matter what decision will be made on Right now everybody who is using npm's and bower's defaults to define dependencies in |
My
.complete
callback is called before the transition and after.I have to use this workaround to use it under current circumstances:
The text was updated successfully, but these errors were encountered: