codeGK
Code it ALL
jQuery click() - CodeGK

♦ jQuery click()

♣ Example1: jQuery click()

The click() method is used, when we need an action to be performed upon click.
The click is done on HTML element.
A particular function can be executed upon click which can altogether have multiple functionalities.
Below is the representation of click() Syntax.
Basic Syntax
$(selector).click(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