Skip to main content

detachEvent

Unsubscribes from the specified event.

Syntax

expression.detachEvent(eventName);

expression - A variable that represents a Api class.

Parameters

NameRequired/OptionalData typeDefaultDescription
eventNameRequiredstringThe event name.

Returns

boolean

Example

This example shows how to unsubscribe from the hyperlink click event.

// How to detach from the "asc_onHyperlinkClick" event.

// Unsubscribes from the "asc_onHyperlinkClick" event.

Api.detachEvent("asc_onHyperlinkClick");