event.result
JQ Home <<
Objects <<
event.result
Event last event handler trigger property.
Description
The event.result Event object property, contains the value of the last value returned by an event handler triggered by this event, unless the value was undefined.
Syntax
| Signature | Description |
|---|---|
event.result | The value of the last value returned by an event handler triggered by this event, unless the value was undefined. |
Parameters
None.
Return
An Object object.
event.result Example
Objects << Top
Contains the value of the last value returned by an event handler triggered by this event, unless the value was undefined.
When we press the button below the first 'click' event fires and stores the event.result property which we retrieve and display with the second event handler.
$(function(){
$('#btn6').on('click', function(event) {
return 'This string will be stored in event.result';
});
$('#btn6').on('click', function(event) {
$('#div4').html(event.result);
});
});
div4. Some initial text.
Related Tutorials
jQuery Advanced Tutorials - Lesson 5 - The Event Object
