javascriptevent-handlingdom-eventsunbind

Why should I unbind Javascript Events?


Could anyone explain why I should unbind or detach Javascript Events?


Solution

    1. Because you simply no longer want the events to fire
    2. Because they take up memory. Note that in old versions of IE, manual unbinding may be needed for memory to be freed, even if the elements are removed from the DOM.