I have this code:
$.when($.post(...)).then(function () {
  ...
});
Which I want to combine with $(document).ready(...); so that the request  starts when the page initializes, and everything inside the .then function runs when both the page and the POST request have finished loading.
How can I do this?
 
     
    