Example 1 — focusout vs blur on a Parent
Official idea: count both events on a paragraph — only focusout increments for nested leave.
var focusout = 0, blur = 0;
$("p")
.on("focusout", function () {
focusout++;
$("#out").text("focusout: " + focusout + "x | blur: " + blur + "x");
})
.on("blur", function () {
blur++;
$("#out").text("focusout: " + focusout + "x | blur: " + blur + "x");
}); How It Works
- Bind both. The paragraph listens for
focusoutandblur. - Leave. Tabbing out of a nested input fires both events on the input.
- Bubble. Only
focusoutreaches the paragraph.

