HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

bubbles Event Property

Event Object Reference Event Object

Definition and Usage

The bubbles event property returns a Boolean value that indicates whether or not the event is a bubbling event.

Event bubbling directs an event to its intended target, it works like this:

  • A button is clicked and the event is directed to the button
  • If an event handler is set for that object, the event is triggered
  • If no event handler is set for that object, the event bubbles up (like a bubble in water) to the objects parent

The event bubbles up from parent to parent until it is handled, or until it reaches the document object.

Syntax

event.bubbles


Example

Example

The following example checks if the triggered event is a bubbling event:

<html>
<head>

<script>
function myFunction(e)
  {
  alert(e.bubbles);
  }
</script>
</head>

<body>

<p onclick="myFunction(event)">Click this paragraph.
An alert box will tell if the
event is a bubbling event.</p>

</body>
</html>

Try it yourself »


Event Object Reference Event Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE