I am a little confused by this question. I think this is because you are confused by promise and delegate . These are actually completely unrelated features of jQuery. I will explain each separately:
delegate
delegate is a jQuery function that was introduced in jQuery 1.4.2. (This is a more convenient approach to live , which was added in jQuery 1.3). It solves a specific problem associated with modifying the DOM and, in particular, with AJAX calls.
When you bind an event handler, you bind it to a selection. So you can do $('.special').click(fn) to associate the event handler with all members of the special class. You are attached to these elements, so if you delete a class from one of these elements, the event will still be fired. Conversely, if you add a class to an element (or add a new element to the DOM), it will not be associated with the event.
There is a Javascript function that softens this, called a "bubble event." When an event is fired, the browser first notifies the element in which the event occurred. Then it goes up the DOM tree and notifies each element of the ancestor. This means that you can associate an event handler with an element located up the DOM tree and events triggered on any child elements (even those that do not exist when the handler is bound).
delegate is a jQuery implementation. First you select the parent element. Then you specify the selector - the handler will be launched only if the source element matches this selector. Then you specify the type of event, for example click , submit , keydown , just like bind . Then, finally, you specify an event handler.
$('#containingElement').delegate('a.special', 'click', function() { alert('This will happen on all links with the special class'); });
promise
promise is another relatively recent addition to the iQuery function. It is part of the Deferred concept, which was introduced in jQuery 1.5. (I think that the similarity in sound between βdeferredβ and βdelegateβ is probably a source of confusion.) This is a way to ignore the complications of asynchronous code. The best example of this is with AJAX calls, since the object returned by $.ajax is a Deferred object. For example:
$.ajax({ url: 'somepage.cgi', data: {foo: 'bar'} }).done(function() {
Thus, it is in many ways similar to the processes of binding to successful execution in the $.ajax call, except that you can bind more than one handler, and you can bind them after the initial call.
Another time it would be useful to process the animation asynchronously. You can provide callbacks for functions, but it would be better to do this with similar syntax with the AJAX example that I provided above.
In jQuery 1.6, this functionality has become possible, and promise is part of this implementation. You call jQuery a promise , and you get an object with which you can associate event handlers when all animations in the object are complete.
For example:
$('div.special').fadeIn(5000).promise().then(function() {
Again, this is similar to traditional methods, but it adds flexibility. You can bind handlers later, and you can bind more than one.
Summary
In principle, there is no significant relationship between delegate and promise , but they are useful features in modern jQuery.