jQuery fadeIn() method
Example
Display all with a fade-in effect
element:
$
(
"
button
"
)
.
click
(
function
(
)
{
$
(
"
p
"
)
.
fadeIn
(
)
;
}
)
;
Try it »
Definition and Usage
The fadeIn() method gradually changes the opacity of the selected elements, from hidden to visible (a fading effect).
**Note:** Hidden elements will not be fully displayed (they no longer affect the page's layout).
**Tip:** This method is usually used together with fadeOut() the method.
Syntax
$(
selector
).fadeIn(
speed,easing,callback
)
| Parameters | Description |
|---|---|
| speed | Optional. Specifies the speed of the fading effect.
Possible values: |
Possible values:
- "swing" - Moves slowly at the beginning/end, and faster in the middle
- "linear" - Moves at a constant speed
To learn more about callback, please visit our jQuery Callback chapter on callbacks.
|Try it - Example
fadeIn() - Using the speed parameter
How to use the speed parameter to specify the speed of the fading effect.
fadeIn() - Using the callback parameter
How to use the callback parameter when displaying elements with a fade-in effect.
jQuery effects methods