/** * @param element The element to remove the event from * @param type Event type (i.e. 'click') * @param callback Original function that was attached to the specified event */ function (element, type, callback) { try { element.removeEventListener(type, calback, false); } catch (e) { element.detachEvent('on' + type, callback); } };