Reputation: 305
When I add callback to show/hide, my element starts to animate. I dont want it. I just need to add a function AFTER show/hide is finished.
I cannot nullify time, cause i use option-based function (element CAN be animated, but if its not wanted, it must just show-hide. With callback attached to it, it does not work :(
Is there a neat trick to elliminate animation on show/hide? OR is there another way to add a function AFTER animation has finished?
Thanks in advance!
Found the solution! Just do:
show('','', function()...
Upvotes: 6
Views: 8590
Reputation: 6181
From the documentation:
.show( [duration] [, easing] [, callback] )
To specifically disable the animation, set it's duration to zero and no easing:
.show(0,'', function(){
//your code here
});
Upvotes: 18