jQuery focus() method

jQuery focus() method


If you want to trigger an event when an input field gets focus or a mouse is clicked, then use the jQuery focus() method.


The following is the syntax,

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

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


The following is the output,

Click inside the input field to trigger the event,

jQuery dblclick() method
jQuery focusin() method
Studyopedia Editorial Staff
Studyopedia Editorial Staff
[email protected]

We work to create free tutorials for all.

No Comments

Post A Comment