title: What is $.Deferred() and .resolve in jquery
body: <p>What exactly .deferred do what is its work and where and when we should use .deferred with resolve. In below function I have two .done callbacks. I want to set two different callback msg. <a href="http://jsfiddle.net/WLpBB/" rel="noreferrer">fiddle</a></p>
  
  <pre><code>var deferred = $.Deferred();
  deferred.done(function(value) {
      alert(value);
  }).done(function(id){
  alert(id)
  });
  
  console.log(deferred)
  
  deferred.resolve("hello world");
  </code></pre>