codeGK
Code it ALL
jQuery focus() - CodeGK

♦ jQuery focus()

♣ Example6: jQuery focus()

The focus() method is used in form field functioning.
Action is executed when the form input is active to be entered.
Below is the representation of focus() Syntax.
Basic Syntax
$(selector).focus(function(){
//code_block
})
Syntax Explanation:
selector : element selector for event to be performed
code_block : code for execution, which will execute when event is performed
In this example, .
Example
Input:
Output:
Events