event.isPropagationStopped()
S2C Home « Objects « isPropagationStopped()
Event propagation stopped checker method.
Description
The event.isPropagationStopped()
Event object method returns a boolean dependant upon event.stopPropagation()
ever being called on this event object.
Syntax
Signature | Description |
---|---|
event.isPropagationStopped() | Return a boolean dependant upon event.stopPropagation() ever being called on this event object. |
Parameters
None.
Return
A Boolean
object.
event.isPropagationStopped()
ExampleTop
Return a boolean dependant upon event.stopPropagation()
ever being called on this event object.
In the example below we show two new messages in the 'div' element with an id of 'div13' the first time the mouse is clicked on this element. One before event.stopPropagation
has been called and one after.
$(function(){
$('#div13').one('click', function(event) {
$('#div13').append('Has event.isPropagationStopped() been called on this event object? '
+ event.isPropagationStopped() + '<br/>');
event.stopPropagation();
$('#div13').append('Has event.isPropagationStopped() been called on this event object? '
+ event.isPropagationStopped() + '<br/>');
});
});
div13. Some initial text.