Methods

This section describes the methods that the DevExpress.events namespace exposes.

off(element, eventName, selector, handler)

Detaches an event handler from the specified element.

Module: events
Export: off
Parameters:
element:

Element (jQuery or HTML)

An element from which to detach the handler.

eventName:

String

The event name.

selector:

String

A selector that must match the one originally passed to the on() method when attaching the handler.

handler:

function

A handler to detach.

on(element, eventName, selector, data, handler)

Attaches an event handler to the specified element.

Module: events
Export: on
Parameters:
element:

Element (jQuery or HTML)

An element to which to attach the handler.

eventName:

String

The event name.

selector:

String

A selector to filter the element's descendants. If the selector is null or omitted, the event is always triggered on reaching the element.

data:

Object

Data to be passed to the handler in event.data when the event is triggered.

handler:

function

A function to execute on triggering the event.

one(element, eventName, selector, data, handler)

Attaches an event handler to be executed only once to the specified element.

Module: events
Export: one
Parameters:
element:

Element (jQuery or HTML)

An element to which to attach the handler.

eventName:

String

The event name.

selector:

String

A selector to filter the element's descendants. If the selector is null or omitted, the event is always triggered on reaching the element.

data:

Object

Data to be passed to the handler in event.data when the event is triggered.

handler:

function

A function to execute on triggering the event.

trigger(element, event, extraParameters)

Executes all handlers of a given event type attached to the specified element.

Module: events
Export: trigger
Parameters:
element:

Element (jQuery or HTML)

An element to which the handlers to execute are attached.

event:

String

|

Event (jQuery or dxEvent)

The event or its name.

extraParameters:

Object

Additional parameters to pass to the event handler.