.when is a jQuery function for executing a function when the included AJAX request(s) have been completed. It usually precedes .then.