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

jQuery blur() Method

jQuery Event Methods jQuery Event Methods

Example

Attach a function to the blur event. The blur event occurs when the <input> field loses focus:

$("input").blur(function(){
  alert("This input field has lost its focus.");
});

Try it yourself »

Definition and Usage

The blur event occurs when an element loses focus.

The blur() method triggers the blur event, or attaches a function to run when a blur event occurs.

Tip: This method is often used together with the focus() method.


Syntax

Trigger the blur event for the selected elements:

$(selector).blur() Try it

Attach a function to the blur event:

$(selector).blur(function) Try it

Parameter Description
function Optional. Specifies the function to run when the blur event occurs


jQuery Event Methods jQuery Event Methods


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

facebook