stopPropagation() Event Method

Definition and Usage

The stopPropagation() method prevents the propagation of the same event from being called.

Propagation means bubbling up to the parent element or capturing down to the child element.

Example

Prevent any propagation of the same event:

function func1(event) {
  alert("DIV 1");
  event.stopPropagation();
}

Try It Yourself

Syntax

event.stopPropagation()

Parameters

None

Technical Details

Return Value: No Return Value
DOM Version: DOM Level 3 Events

Browser Support

The numbers in the table indicate the first browser version that fully supports this method.

Methods Chrome IE Firefox Safari Opera
stopPropagation() Support 9.0 Support Support Support