jQuery focusin() method


Trigger an event when an element gets focus, using the jQuery focusin() method. The focus() and focusin() method looks the same, but are different. The focus() method does not trigger if a child element gets focus.

Note: The focusout() method is used often along with focusin().


The following is the syntax,

The following is the parameter used in the jQuery focusin() method,

  • func: When event occur, this function runs. It is an optional parameter.


The following is the output,

Click inside the input field to get focus,

jQuery focus() method
jQuery focusout() method
Studyopedia Editorial Staff
[email protected]

We work to create programming tutorials for all.

No Comments

Post A Comment

Discover more from Studyopedia

Subscribe now to keep reading and get access to the full archive.

Continue reading