event.result holds the last non-undefined value returned by a handler that ran earlier during the same event dispatch. Later handlers can read it. Especially useful for custom events. Available since jQuery 1.3.
Syntax
Start with these common calls. Keep them short and readable.
jQuery
event.result // last non-undefined handler return (same dispatch)
$("button").on("click", function () {
return "hey"; // stored on event.result
});
$("button").on("click", function (event) {
console.log(event.result); // "hey"
});
// Returning undefined does NOT clear a previous result
Call
What it does
event.result
Learn jQuery event.result: last non-undefined return from a prior handler on the same dispatch, official two-handler click demo, validation chains, custom events, vs event.data, examples, pitfalls, and FAQs.
Load jQuery before your script (CDN or local file), then wrap DOM work in $(function () { ... }) when needed.
Parameters
Parameter
Description
Step 1
Bind two (or more) handlers on the same element and event.
Step 2
In an earlier handler, return a non-undefined value.
Step 3
In a later handler, read event.result.
Return Value
Return Value
Description
jQuery object
Most setters and traversing helpers return the jQuery collection so you can chain more methods.
Value / undefined
Getters usually return a value from the first matched element, or undefined when nothing applies.
jQuery Examples
Example 1 — Official Demo: Show Prior Return
First handler returns "hey"; second displays event.result.
jQuery
$("button").on("click", function () {
return "hey";
});
$("button").on("click", function (event) {
$("#out").text(event.result);
});
A middle handler with no return leaves the first result intact.
jQuery
$("button").on("click", function () {
return "first";
});
$("button").on("click", function () {
// returns undefined — does not clear result
});
$("button").on("click", function (event) {
$("#out").text("result: " + event.result);
});
event.result holds the last non-undefined value returned by a handler that ran earlier during the same event dispatch on the same element. Available since jQuery 1.3. Useful for passing values between handlers, especially on custom events.
Each handler can return a value, but only the most recent non-undefined return is stored on event.result for later handlers. The next handler does not get the return as an argument — it reads event.result.
Bind two click handlers on a button. The first returns "hey". The second sets a paragraph’s HTML to event.result — displaying hey.
No. jQuery updates event.result only when a handler returns a value that is not undefined. A middle handler that returns undefined leaves the previous result intact.
Yes. When you .trigger() a custom event, handlers run in order and can pass data forward via return values. Later handlers read event.result — useful for plugin pipelines.
No. event.data is set at bind time with .on("click", { id: 1 }, fn). event.result is a return value from an earlier handler during dispatch. They are separate channels.