What I want to do is, to animate and hide some div, on closerlink button click, then hide this button. Function works but doesn’t hide the closer_div and gives error message:
ftr_form_cntr.stop(true, true).animate({height: “0”}, 1000).pause is not a function
on Firefox. Actually it does all operations exc. this line closer_div.hide();.
Function looks like that
$(closer_link).click(function () {
ftr_form_cntr.find("div").fadeOut();
ftr_form_cntr.stop(true, true).animate({height:"0"},1000).pause(2000).hide();
closer_div.hide();
});
The animate function does have a callback function that will be triggered when the animation is completed, see code below:
What you can also do, if you want a height of 0 and have it hidden after. Use the
.slideUp()function, this function also has a callback function.If you want to animate, wait 1 second and do something else, do something like:
Another option can be the
.delay(), which waits 2 seconds.