Saving a jQuery event handler for later use

Quick note: If you need to save an event handler so you can unbind the event and rebind it later, the code below will do the trick. This is especially helpful if you’re using a jQuery plugin that attaches events to your element, but you want to temporarily unbind it.

var submit = $("#submit");
//Save original click event handler for later
var click ="events")["click"][0].handler;
//Unbind click event
//Bind click to original event (e) {
	$.proxy(click, submit)(e);