jQuery click() Method
jQuery click() Method
The click event is used to occur when an element is clicked. The click() method is used to trigger the click event. We can attach a function to it when a click event occurs.
Syntax:-
Its syntax is:- $(selector).click(function)
Further Explanation:-
Parameter | Description |
---|---|
function | Optional. Specifies the function to run when the click event occurs |