About Callback method jquery in order to control the animation and functions performed

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");
  });
});

Here Insert Picture Description
After clicking to animate, after the trigger function.
Here Insert Picture Description

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");
});
Published 37 original articles · won praise 29 · views 10000 +

Guess you like

Origin blog.csdn.net/qq_42755868/article/details/88658896