

off("click.simple") without disturbing other click handlers attached to the elements. A click event handler attached via that string could be removed with. For example, "" defines both the myPlugin and simple namespaces for this particular click event. Event names should only contain alphanumerics, underscore, and colon characters.Īn event name can be qualified by event namespaces that simplify removing or triggering the event. trigger() method can trigger both standard browser event names and custom event names to call attached handlers. jQuery will pass through the browser's standard JavaScript event types, calling the handler function when the browser generates events due to user actions such as click. one() Event names and namespacesĪny event names can be used for the events argument.

To attach an event that runs only once and then removes itself, see. For help in converting from older jQuery event methods, see.

on() method provides all functionality required for attaching event handlers. on() method attaches event handlers to the currently selected set of elements in the jQuery object.
