About animation and has a function to perform control of the following two pieces of code can be well explained,
$("button").click(function(){
$("p").hide("slow",function(){
alert("The paragraph is now hidden");
});
});
After clicking to animate, after the trigger function.
The following code, it is the first implementation of the code, after the trigger animations
$("button").click(function(){
$("p").hide(1000);
alert("The paragraph is now hidden");
});