jQuery event.result Property

Last Updated:

jQuery event.result Property

The jQuery event.result property contains the last value returned by an event handler that was triggered by this event.

This property can be useful for getting previous return values of custom events.

Example

HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> </head> <body> <h1>jQuery event.result Property</h1> <button>Click Me</button> <p>Event result is <strong></strong></p> <script> $(document).ready(function(){ $("button").click(function(){ return "Hello jQuery!"; }); $("button").click(function(event){ $("strong").text(event.result); }); }); </script> </body> </html>

Syntax

event.result;

Return Value

Value Explanation
string Returns the previous return values of custom events.

Browser Support

Devicedesktopmobile
Browsergoogle chromesafarifirefoxinternet Exploreredgeoperagoogle chromesafarifirefoxedgeoperaandroid webviewsamsung internet
event.resultYesYesYesYesYesYesYesYesYesYesYesYesYes

Share this Page

Meet the Author