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()...
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
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With