After fulfilling promises (run for 7 seconds) jQuery raises an event.
$.when(deferredActionsDone).done(function() { $(document).trigger('done'); }); This is how it works:
$(document).on('done', function() { alert('deferred actions done!'); }); That's not how it works) Tell me where to dig, how to make it work)
setTimeout(function() { $(document).on('done', function() { alert('deferred actions done!'); }); }, 15000);