The .fadeIn() instance method displays matched elements by fading them to opaque. This tutorial covers all three overloads since jQuery 1.0 (including easing since 1.4.3), default and preset durations, per-element callbacks, comparisons with .show(), .fadeOut(), .fadeTo(), and .animate({ opacity }), and five hands-on examples from the official jQuery API.
01
Reveal
Hidden → opaque
02
Duration
ms, fast, slow
03
Three overloads
Positional / options
04
Easing
Since 1.4.3
05
Callbacks
Once per element
06
fx queue
Chain with hide
Fundamentals
Introduction
Instant .show() makes content appear in one frame. When you want a softer entrance — a tooltip, modal overlay, or gallery image materializing gradually — .fadeIn() is the shorthand jQuery effect for that job.
Available since jQuery 1.0, .fadeIn() animates opacity toward full visibility and handles the display property so hidden elements become shown. It enqueues on the default fx queue like other effects, which means you can chain it after .hide(), .delay(), or another animation for readable sequential reveals.
Concept
Understanding the .fadeIn() Method
Per the official jQuery API, .fadeIn() displays matched elements by fading them to opaque. It is similar to .fadeTo(), but unlike .fadeTo(), .fadeIn() unhides the element and always targets full opacity.
Elements should start hidden — typically via .hide() or CSS display: none. The method tweens opacity from 0 to 1 over the duration you supply, then leaves the element visible at full opacity.
💡
Beginner Tip
Think of .fadeIn() as the polite entrance to .fadeOut()’s exit. Hide first, fade in when ready — one line replaces manual opacity and display juggling.
📋 .fadeIn() vs fadeOut vs fadeTo vs .show() vs .animate({ opacity })
Five ways to change visibility — only .fadeIn() unhides and fades to full opacity in one shorthand call.
.fadeIn()
$el.fadeIn("slow")
Unhides hidden elements and animates opacity to 1 — preset reveal shorthand
.fadeOut()
$el.fadeOut("slow")
Opposite exit — fades to transparent then hides; pair with .fadeIn() for toggle UX
.fadeTo()
$el.fadeTo(400, 0.5)
Animates to a specific opacity level but does not unhide — element stays in current display state
.show()
$el.show()
Instant reveal with no opacity transition — use when animation is not needed
.animate({ opacity })
.animate({ opacity: 1 }, 400)
Custom opacity tween — does not auto-handle display; call .show() first if hidden
Hands-On
Examples Gallery
Each example demonstrates an official jQuery API .fadeIn() pattern. Open DevTools or use the Try-it links. All five mirror live demos on api.jquery.com/fadeIn/.
📚 Getting Started
Official jQuery API demos — basic click-to-reveal and sequential hidden div fades.
Example 1 — Basic Usage: Hidden #book fadeIn("slow") on Click
With the element initially hidden, click #clickme to fade in #book over the slow preset (600 ms).
jQuery
// With the element initially hidden, we can show it slowly:
$( "#clickme" ).on( "click", function() {
$( "#book" ).fadeIn( "slow", function() {
// Animation complete.
});
});
#book starts hidden; click reveals it with a 600ms opacity tween to full visibility
How It Works
.fadeIn("slow") maps to 600 milliseconds. jQuery sets display so the element can render, animates opacity from 0 to 1, and fires the callback once per matched element when done.
Example 2 — Hidden Divs Fade In One by One (Official Example 1)
Each body click reveals the first still-hidden div with .fadeIn("slow"), producing a sequential color-block entrance.
Click 1: red div fades in. Click 2: green. Click 3: blue. Each uses 600ms slow preset.
How It Works
$("div:hidden").first() selects only the next hidden block. Rapid clicks enqueue separate fades on the fx queue, so animations can stack if you click faster than 600 ms.
📈 Advanced Patterns
Callback chaining, alert-style reveals, and easing since jQuery 1.4.3.
Example 3 — CENSORED Overlay Then Span Reveal (Official Example 2)
Click the link to fade in a red CENSORED! overlay over 3000 ms, then quickly fade in replacement text in the callback.
Red overlay fades in over 3s; when complete, hidden span text fades in over 100ms
How It Works
The complete callback runs after the overlay div finishes — ideal for stringing a slow dramatic fade followed by a quick text reveal without nested timers.
Example 4 — Chained hide().fadeIn(800) Alert-Style Reveal
Reset visibility instantly with .hide(), then enqueue a smooth 800 ms fade when the user clicks a button — common modal and notification pattern.
Panel fades in at steady linear pace over 600ms; callback updates text when done
How It Works
Since jQuery 1.4.3, the middle argument names an easing function. Built-in options are swing (default, accelerates mid-animation) and linear (constant rate). jQuery UI adds more easing plugins.
Applications
🚀 Common Use Cases
Modal and overlay entrances — fade in dimmed backdrops and dialog panels after .hide() reset.
Progressive disclosure — reveal hidden divs one at a time on user interaction, as in the official demo.
Notification toasts — chain .hide().fadeIn() for repeatable alert-style messages.
Image galleries — cross-fade captions or thumbnails hidden with display: none.
Sequential storytelling — slow overlay fade followed by quick text reveal via the complete callback.
Effect chains — combine with .delay() and .fadeOut() for full show/hide choreography on the fx queue.
🧠 How .fadeIn() Reveals an Element
1
Element starts hidden
Target must be hidden — display: none from .hide() or CSS. Already-visible elements see little change.
Prerequisite
2
Display restored, opacity at 0
jQuery sets display so the box can render, then begins the opacity tween from transparent toward opaque.
Setup
3
Opacity animates over duration
Default 400 ms, or your chosen ms / fast / slow with optional swing or linear easing.
Tween
4
▶
Full opacity and callback
Element ends at opacity 1 and visible. complete fires once per matched element; fx queue advances to the next step.
Important
📝 Notes
Available since jQuery 1.0; easing overload added in 1.4.3; Promise callbacks in options since 1.8.
Similar to .fadeTo() but .fadeIn() unhides and always targets full opacity.
Callbacks fire once per matched element — use .promise().done() for one set-level callback.
Elements should be hidden first; calling on visible content produces minimal visible effect.
Set jQuery.fx.off = true globally to disable all effects including .fadeIn() (duration becomes 0).
Compatibility
Browser Support
.fadeIn() is a jQuery instance method since 1.0+. It uses jQuery’s internal fx engine and opacity tweens — behavior is consistent wherever jQuery runs, independent of CSS transition support.
✓ Stable · jQuery 1.0+
jQuery .fadeIn()
Supported in all jQuery 1.x, 2.x, 3.x, and 4.x releases. Works in Chrome, Firefox, Safari, Edge, IE 6+ (with compatible jQuery builds), and Node.js via jsdom.
100%jQuery fadeIn API support
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
.fadeIn()Universal
Bottom line: Learn .fadeIn() alongside .fadeOut(), .delay(), and .queue() to build polished reveal and hide sequences in legacy and modern jQuery apps.
Wrap Up
Conclusion
The .fadeIn() method is jQuery’s shorthand for revealing hidden elements with an opacity transition to full visibility. Three overloads cover simple durations, options objects, and easing since 1.4.3.
Hide elements first, pick your duration or preset, and use the complete callback to chain follow-up effects. Pair this method with .delay() behind you and .queue() ahead to master the full fx pipeline.
Hide elements with .hide() or CSS before calling .fadeIn()
Use "slow" / "fast" for readable preset timing across your app
Chain .hide().fadeIn() to replay alert-style reveals on repeated clicks
Use the complete callback to enqueue the next effect without setTimeout
Call .promise().done() when you need one callback after all elements finish
❌ Don’t
Expect visible elements to animate — .fadeIn() is for hidden content
Use .fadeIn() when you need a partial opacity — choose .fadeTo() instead
Replace .fadeIn() with .animate({ opacity: 1 }) on hidden elements without handling display
Assume one callback covers the whole set — it fires per matched element
Forget jQuery.fx.off in tests — it zeroes duration for all effects globally
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about .fadeIn()
Shorthand reveal by fading hidden elements to full opacity.
5
Core concepts
🌟01
Unhide + fade
Opacity to 1
Core
⏱02
Three overloads
Positional / options
API
🔄03
400 / fast / slow
Default durations
Timing
📝04
Per-element cb
Not once per set
Callback
👁05
Start hidden
display:none first
Rule
❓ Frequently Asked Questions
.fadeIn() displays matched elements by fading them to full opacity. It animates the opacity property from 0 toward 1 and restores appropriate display values so hidden content becomes visible. Use it when you want 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 specific opacity but does not unhide elements. .animate({ opacity: 1 }) tweens opacity but does not handle display the way shorthand effects do. .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.
The complete callback runs once per matched element when that element's fade finishes — not once for the entire set. Use .promise().done() when you need a single callback after all elements complete.
Yes. .fadeIn() is meant for elements that are hidden — typically display:none or visibility:hidden via .hide(). Calling it on already-visible elements has little visible effect because they are already opaque and shown.
Did you know?
The official jQuery .fadeIn() CENSORED demo runs a 3000 ms overlay fade, then fires a 100 ms span.fadeIn() inside the completion callback. That pattern — slow primary reveal, fast secondary reveal in the callback — is one of the most copied sequencing tricks in the entire effects API, and it needs no setTimeout at all.