jstoudt/enscroll — Issue #6: Use jQuery Events Namespaces Instead of Storing Handler References
Author: jstoudt
Created: 2012-01-11 19:59:46+00:00
State: open

In order to properly destroy the plugin after it has been applied to an element, you need to unbind handlers that have been bound on initialization. In order to do this, you need to save a reference to the handler function. Currently, this is being done by adding to the pane element's jQuery data object. Starting in jQuery 1.7, however, we can bind events to handlers with a namespace so that we can remove the specific event handler in the destroy API method without the extra work of storing the references.