jquery Removal Events

Source: Internet
Author: User

Remove event unbind (type [, data])//data is the function to remove $ (' #btn '). Unbind ("click"); Remove the click $ (' #btn '). Unbind ();     Remove all cases in which one () $ (' #btn ') is required to immediately unbind the trigger once. One ("click", Function () {...});    The simulation operation can be performed using the trigger () method.     $ (' #btn '). Trigger ("click");    $ (' #btn '). Click ();    Trigger Custom Event $ (' #btn '). Bind ("Myclick", function () {...});     $ (' #btn '). Trigger ("Myclick");    Pass data trigger (type [, Data]) $ (' #btn '). Bind ("Myclick", function (Event,message1,message2) {...});    $ (' #btn '). Trigger ("Myclick", ["passed to Message1", "transmitted to Message2"]);        Performs a default action of $ ("input"). Trigger ("focus");    Not only does it trigger the focus event that the input element binds to, it also triggers the default action--Gets the focus.        $ ("input"). Triggerhandler ("Focus");    Only trigger binding events, do not perform browser default actions other usages bind multiple event types $ ("div"). Bind ("mouseover mouseout", function () {...});    Add the Event namespace $ ("div"). Bind ("Click.plugin", function () {...});        Add a namespace after the world type you are binding so that you only need to specify a namespace when you delete an event.   $ ("div"). Unbind (". Plugin"); Delete the event within the space $ ("div"). Trigger ("click!");    Trigger so does not include the click Method in the NamespaceIf included in the namespace also to be triggered: $ ("div"). Trigger ("click"); 

jquery Removal Events

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.