Click ([[data], fn])
Returned value: jQuery
Overview
Trigger the click event of each matching element.
This function calls and executes all the functions bound to the click event.
Parameters
FnFunctionV1.0
The handler bound to each click event that matches the element.
[Data], fnString, FunctionV1.4.3
Data: click ([Data], fn) can pass in data for the function fn to process.
Fn: the handler bound to each click event that matches the element.
Example
Description:
Trigger click events for all sections on the page
JQuery code:
$ ("P"). click (); Description:
Click and hide all paragraphs on the page.
JQuery code:
$ ("P "). click (function () {$ (this ). hide () ;}); The above content is in the JQuery reference manual. I have consulted a lot of relevant references, but I have not described the [data] parameter in detail.
The parameter data is an additional data object passed to the event object as the event. data property value.
The fn parameter is the processing function bound to the event of each selected element.
<! DOCTYPE html>