JQ Analog Trigger Event

Source: Internet
Author: User

JQuery Event-Trigger () method

JQuery Event Reference Manual

Instance

The Select event that triggers the INPUT element:

$ ("button"). Click (function () {  $ ("input"). Trigger ("select");});


Definition and usage

The trigger () method triggers the specified event type for the selected element.

Triggering events

Specifies the event to be triggered by the selected element.

Grammar
$ (selector). Trigger (event, [param1,param2,...])

Try it yourself.

Parameters Description
Event

Necessary. Specifies the event to be triggered by the specified element.

You can make custom events (using the bind () function to attach), or any standard event.

[param1,param2,...]

Optional. The extra parameters passed to the event handler.

Additional parameters are particularly useful for custom events.

Using the event object to trigger an event

Specifies the event to be triggered by the selected element that uses the event object.

Grammar
$ (selector). Trigger (EVENTOBJ)

Try it yourself.

Parameters Description
EventObj Necessary. Specifies the function to run when an event occurs.

JQ Analog Trigger Event

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.