Jqueryclick ([data], fn) usage example _ jquery

Source: Internet
Author: User
This article uses an example to describe how to use jqueryclick ([data], fn) to trigger a click event for each matching element, for more information, see 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.

The Code is as follows:




<BR> JQuery [data] parameter instructions <BR>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.