So div 1 is now 0.15, div 2 is now 0.4, and div 3 is now 0.7(1 = no transparency).

Callback

Statements are executed line by line. However, with effects, the next line of code can be run even though the effect is not finished. This why we use “callback”, in the normal effects, we specify speed, sometimes opacity and that’s it, but here is what callback does:

$("button").click(function(){ // When button is clicked run this function
$("p").hide("slow", function(){ /* hide the p element slowly AND when you are DONE, alert.*/
alert("The paragraph is now hidden");
});
});

So here we added a parameter called function, which says: “after you have finished this effect 100%, do this”.