The resolve() method marks a jQuery Deferred as successful. It runs done() and then() handlers with your result value — and prevents fail() from firing. This tutorial covers syntax, five examples, comparisons with reject() and done(), and when to resolve vs reject.
01
Syntax
dfd.resolve(value)
02
State
resolved
03
done()
Handlers run
04
vs reject
One settlement
05
Owner only
Not on promise
06
Since 1.5
Core Deferred API
Fundamentals
Introduction
Async work eventually finishes — data loads, validation passes, animations complete. When you own a $.Deferred(), you signal success by calling resolve() — the mirror image of reject() for failure.
Listeners registered with done() or then() receive the result you pass. Consumers holding only a promise() cannot call resolve() — only the module that created the Deferred settles it.
Concept
Understanding the resolve() Method
resolve() transitions a pending Deferred into the resolved state. jQuery invokes every queued done(), then(), and success branch of always() handlers with the arguments you pass to resolve().
Once resolved, the state is permanent — you cannot reject() the same Deferred afterward. fail() handlers never run on a resolved Deferred.
💡
Beginner Tip
Register done() before calling resolve() when teaching or debugging — the flow is easier to follow. jQuery still runs handlers added after resolution, but attaching first keeps examples clear.
Foundation
📝 Syntax
General form of deferred.resolve:
jQuery
deferred.resolve( [ args ] )
Parameters
args (optional) — result value(s) forwarded to done() handlers: string, object, array, or multiple values.
Return value
Returns the same Deferred object for chaining (though state is now locked to resolved).
Deferred waits; done() handlers may already be registered.
Before
2
resolve()
State locks to resolved; done/then/always handlers run.
Settle
3
No fail()
Failure handlers are skipped; further resolve/reject calls ignored.
Final
=
✅
Handled success
UI updates via done(); cleanup via always().
Important
📝 Notes
Only call resolve() on Deferreds you own — not on promises returned to you.
Always pair public async APIs with consumer-side done() or then().
Pass meaningful result values — objects, arrays, or structured tuples.
state() returns "resolved" after resolve (preferred over deprecated isResolved() in jQuery 3+).
For custom this in done handlers, use resolveWith() next.
Compatibility
Browser Support
deferred.resolve() has been available since jQuery 1.5 alongside the Deferred API. It works in jQuery 1.5+, 2.x, and 3.x.
✓ jQuery 1.5+
jQuery Deferred.resolve()
Universal wherever jQuery Deferred runs. jqXHR uses the same resolution machinery when AJAX requests succeed.
100%With jQuery loaded
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
deferred.resolve()Universal
Bottom line: Core API for signaling async success in jQuery since 1.5. Always handle results on the consumer side.
Wrap Up
🎉 Conclusion
The deferred.resolve() method settles a Deferred as successful. Call it when data is ready, validation passes, or async work completes — then let done() and then() update the UI or continue the workflow.
Next, explore resolveWith() when done handlers need a custom this context, or review done() for the listener side of success handling.
Return promise() — resolve on the private Deferred
❌ Don’t
Call both resolve() and reject()
Resolve without any done/then handler in user flows
Expose resolve() on public promise objects
Resolve before sending final progress with notify()
Assume fail() runs after resolve
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about resolve()
How to signal success on a jQuery Deferred.
5
Core concepts
📝01
Syntax
dfd.resolve(args)
API
✅02
State
resolved
Success
done03
done()
Runs on resolve
Listen
1x04
Once
Locked state
Final
vs05
reject
Opposite
Pair
❓ Frequently Asked Questions
resolve() settles the Deferred as successful. It triggers done(), then(), and the success branch of always() handlers, passing optional result values (data object, message, etc.). The state locks to resolved — fail() will not run.
resolve() is called by the Deferred owner to signal success. done() registers a callback that runs when resolution happens. Think: resolve() fires the event; done() listens for it.
No. A Deferred settles once. If it already rejected, a later resolve() is ignored. Likewise, reject() after resolve() has no effect.
Any value — a string, object, array, or multiple arguments like resolve(status, body, meta). done() handlers receive the same arguments.
No. Resolution triggers done/then/always success paths, not progress. Send final progress updates with notify() before resolve() if needed.
Use resolveWith(context, args) when done() handlers need a specific this value and arguments in an array — same pattern as rejectWith() and notifyWith().
Did you know?
When a jQuery AJAX request succeeds, the jqXHR object resolves its internal Deferred automatically — you handle it with .done() without calling resolve() yourself. Custom helpers that wrap non-jQuery async code use resolve() the same way jQuery does internally for successful HTTP responses.