Example 1 — Official: currentTarget === this
Click a paragraph; confirm the official equality check.
$("p").on("click", function (event) {
$("#out").text(
"event.currentTarget === this → " +
(event.currentTarget === this)
);
}); How It Works
- Bind. Every
pgets a click handler. - Click. The handler on that paragraph runs.
- Compare.
event.currentTargetandthisare the same element.

