.fadeIn() (since jQuery 1.0) displays matched elements by fading them to opaque (opacity 1). It unhides the element and animates opacity. Returns the jQuery object for chaining.
Syntax
Start with these common calls. Keep them short and readable.
jQuery
$("#book").fadeIn(); // default 400 ms
$("#book").fadeIn("slow", function () { /* done */ });
$("#panel").fadeIn(600, "linear");
// Unhides + fades to opacity 1
// Unlike .fadeTo() — that does not unhide
Call
What it does
.fadeIn() Reveal Elements by Fading In
Learn jQuery .fadeIn(): reveal hidden elements by animating opacity to opaque since 1.0, duration and easing defaults, per-element callbacks, options object, and compare with show, fadeOut, fadeTo, and fadeToggle.
Load jQuery before your script (CDN or local file), then wrap DOM work in $(function () { ... }) when needed.
Parameters
Parameter
Description
Step 1
Select the target ($("#book")).
Step 2
Ensure it is hidden (.hide() or CSS display: none).
Step 3
On a user action, call .fadeIn() (optional duration / easing / complete).
Return Value
Return Value
Description
Value / undefined
Getters usually return a value from the first matched element, or undefined when nothing applies.
jQuery Examples
Example 1 — Basic Slow Reveal
From the jQuery docs: fade in a hidden element on click with a complete callback.
jQuery
$("#clickme").on("click", function () {
$("#book").fadeIn("slow", function () {
// Animation complete
});
});
Overlay fades in over 3000 ms
Then the inner span fades in over 100 ms
How It Works
Outer. The overlay fades in for 3 seconds.
Complete. The callback runs when that fade ends.
Inner. The nested span fades in quickly (100 ms).
Frequently Asked Questions
.fadeIn() displays matched elements by fading them to full opacity. It animates opacity toward 1 and restores a visible display value so hidden content becomes visible. Use it for a smooth reveal instead of an instant .show().
1) .fadeIn([duration] [, complete]) — optional duration and completion callback. 2) .fadeIn(options) — an options object with duration, easing, queue, step, progress, and Promise-style callbacks. 3) .fadeIn([duration] [, easing] [, complete]) — positional easing since jQuery 1.4.3.
.show() reveals instantly with no transition. .fadeTo() animates to a target opacity but does not unhide elements. .fadeOut() hides by fading to 0. .fadeIn() both unhides and fades to full opacity in one call.
Duration is in milliseconds. Default is 400 ms when omitted. The strings "fast" (200 ms) and "slow" (600 ms) map to preset speeds, the same as other jQuery effect methods.
Once per matched element when that element’s fade finishes — not once for the whole set. Inside the callback, this is the DOM element. Use .promise().done() when you need a single callback after every element completes.
Yes for a visible effect. .fadeIn() is meant for hidden elements (typically display:none via .hide()). Calling it on already-visible, fully opaque elements has little noticeable effect.