This simple plugin adds 2 methods to jQuery for creating callbacks and providing closure over method arguments.
It is designed to help prevent code that implicitly creates closures from causing memory leaks.
var unrelated1 = 'big string';
var unrelated2 = 'other big string';
can be replaced by the following, which creates a smaller closure
here is the code
pretty simple eh? This trick allows you to write OO code and encapsulate evenHandler functions in Objects, instead of ever growing closures.
It helps to avoid code like this.
jQuery have added the $.proxy() method which is similar to
$.closure() and part of the standard jQuery library so should be used in preference.
This plugin is still useful for existing code and the
$.closeArgs() method which has not been implemented in jQuery (yet).