Add/Remove an Event
General
Use this set of snippets to add or remove events from your scripts. Consists of two functions: addEvent and removeEvent.
Notes
- Created by: Caleb Duke
- Web Site: http://www.askapache.com/
- Posted: November 17, 2006
- '
obj' parameter: The object which is the focus of the event to be called. - '
type' parameter: The name of the event, e.g., "click" or "submit". - '
fn' parameter: Reference to a function that is to be called once the event fires. Requires a parameter.
Source Code
Paste this source code into the designated areas.
External file
Paste this code into an external JavaScript file named: addRemoveEvent.js
Head
Paste this code into the HEAD section of your HTML document.


Leave a Response
(1 comment)helpful script