jQuery > Events

Focus out event in jQuery

How to attach focus out event to an html element in jQuery?

To attach focus out event to a html element, focusout() method can be used.

      $("#txtFocusOut, #txtFocusOut1").focusout(function () {
          alert("got focus out");

In the above code when user leave the focus (keep the cursor away) from “txtFocusOut” and “txtFocusOut1” textboxes then user will be alerted with message "got focus out" (we have used multiple selector here to select multiple element).

 Views: 6473 | Post Order: 71

Write for us

Hosting Recommendations