tadam logo
Did you find an error in the text?
Select this with mouse and press
Ctrl + Enter
Xhtml.co.il Check Spelling
Orphus system

event.result

event.result

Returns: Object

Description: This attribute contains the last value returned by an event handler that was triggered by this event, unless the value was undefined.

event.result

version added: 1.3

Example

Alert previous handler's return value
$("p").click(function(event) {
  return "hey"
});
$("p").click(function(event) {
  alert( event.result );
}); 
The output of the code above will be:

Full source

Alert previous handler's return value
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
                    "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
  <script type="text/javascript" language="javascript">
  $(document).ready(function(){
    $("p").click(function(event) {
       return "hey"
    });
    $("p").click(function(event) {
       alert( event.result );
    });
  });
  </script>

</head>
<body>
	
<p>Click me</p>

</body>
</html>
 

Was this information helpful?
   

Comments