deleteEvent()
The deleteEvent() function (client-side) removes a previously created custom event from the client-side event handler collection. Use this function to undo or clean up event registrations made with createEvent().
Syntax
Use this syntax for the deleteEvent() function:
deleteEvent('eventName');
Return Value
The deleteEvent() function returns true if it successfully deletes the event, or false if it can't find an event by that name.
Parameters
The deleteEvent() function accepts the event name in string format as a required parameter.
Examples
The following examples show how to use the deleteEvent() function.
Deleting an Event
This example removes an event called onProductSelect that was previously registered. If the event exists, the call will return true. Otherwise, it will return false.
deleteEvent('onProductSelect');