closure utils

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';
jQuery('#id').click(function() {
can be replaced by the following, which creates a smaller closure
  $.callback(this, this.myEventHandler)
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).