Description
The .fadeOut() method gradually changes the opacity, for selected elements, from visible to hidden (fading effect).
v1.0
This method has the form:
.fadeOut(duration,callback)
Parameter | Description |
---|---|
duration | (optional) Specifies the speed of the fading effect. (default = "normal").
Possible values:
|
callback | (optional) A function to be executed after the fadeOut() method is completed. |
Return Value
This form returns a jQuery object.
v1.4.3
This method has the alternate form:
.fadeOut(duration,easing,callback)
Parameter | Description |
---|---|
duration | (optional) Specifies the speed of the fading effect. (default = "normal").
Possible values:
|
easing | A string indicating which easing function to use for the transition. |
callback | (optional) A function to be executed after the fadeOut() method is completed. |
Return Value
This form returns a jQuery object.
Examples
Fade out a p element:
$(".btn1").click(function(){
$("p").fadeOut();
});