Welcome to FindNerd, today we are going to discuss how to use focus() Method in Jquery.
Basically focus() Method event when an element gets focus with selected by mouse to it.
So we can say that focus event triggers the focus event.
Note:The focus() Method is sent to an element when it gains focus. focus() Method is implicitly applicable to a inhibited set of elements, such as below element:
Syntax of focus() Method
you can see below example:
<!-- here add jquery library -->
//here call focus() method
<!-- define a input box -->
<span>please enter your name</span>
<!-- when you click in the input field then you will get focus with massage -->