.focusout( handler )Returns: jQuery

Description: Bind an event handler to the "focusout" JavaScript event.

This method is a shortcut for .on( "focusout", handler ) when passed arguments, and .trigger( "focusout" ) when no arguments are passed.

The focusout event is sent to an element when it, or any element inside of it, loses focus. This is distinct from the blur event in that it supports detecting the loss of focus on descendant elements (in other words, it supports event bubbling).

This event will likely be used together with the focusin event.

Additional Notes:

  • As the .focusout() method is just a shorthand for .on( "focusout", handler ), detaching is possible using .off( "focusout" ).


Watch for a loss of focus to occur inside paragraphs and note the difference between the focusout count and the blur count. (The blur count does not change because those events do not bubble.)

<!doctype html>
<html lang="en">
  <meta charset="utf-8">
  <title>focusout demo</title>
  .inputs {
    float: left;
    margin-right: 1em;
  .inputs p {
    margin-top: 0;
  <script src="https://code.jquery.com/jquery-3.5.0.js"></script>
<div class="inputs">
    <input type="text"><br>
    <input type="text">
    <input type="password">
<div id="focus-count">focusout fire</div>
<div id="blur-count">blur fire</div>
var focus = 0,
  blur = 0;
$( "p" )
  .focusout(function() {
    $( "#focus-count" ).text( "focusout fired: " + focus + "x" );
  .blur(function() {
    $( "#blur-count" ).text( "blur fired: " + blur + "x" );


© The jQuery Foundation and other contributors
Licensed under the MIT License.