detach()

Immediately detaches an element from a behavior.

The behavior will stop receiving events associated with the element after it has been detached.

Syntax

behavior.detach(element);

Notes

You do not need to detach an element if it is removed from the DOM. The element will stop receiving events anyway.

See Also