Top "Jquery-deferred" questions

jQuery's deferred (also known as promises and futures) can be used to manage callback queues

How to fetch value from Promise object after promise has been resolved

Please note This is a contrived example. function longFunc(){ var deferred = $.Deferred(); setTimeout(function(){ console.log("long func completed"); deferred.…

javascript jquery promise jquery-deferred
How do I use jQuery promise/deffered in a custom function?

I have a function that gets the location through navigator.geolocation: var getLocation = function( callback ){ navigator.geolocation.getCurrentPosition( callback || function( …

javascript jquery jquery-deferred
Waiting for jQuery AJAX response(s)

I have a page that, using jQuery .ajax that is called 100 times (async: true), the problem is that, when they …

ajax jquery jquery-deferred
jQuery Deferred's, $.when() and the fail() callback arguments

I'm getting an unexpected result when using $.when() when one of the deferred operations does not succeed. Take this JavaScript, …

javascript jquery jquery-deferred
jQuery promise with getJSON and callback

I have an ajax call with a callback. I want to call another method JUST after the callback has ended..…

jquery getjson jquery-deferred promise
How do I chain a sequence of deferred functions in jQuery 1.8.x?

Given these functions: function func1() { var dfd = $.Deferred(); setTimeout(function() { dfd.resolve('Password'); }, 1000); return dfd.promise(); } function func2(message) { var …

javascript asynchronous jquery-deferred
Return an empty promise

I have a function that returns a jQuery promise. It looks like this: addBooks(books: Array<Books>) { return $.…

javascript jquery ajax typescript jquery-deferred
Can jQuery deferreds be cancelled?

I have a situation where I want to cancel a deferred. The deferred is associated with an ajax call. Why …

javascript jquery ajax jquery-deferred cancellation
jQuery deferred : use to delay return of function until async call within function complete + get return value

How can I correctly use jQuery deferreds to delay return of function until async call within function complete + get return …

javascript jquery asynchronous jquery-deferred
jQuery.when - Callback for when ALL Deferreds are no longer 'unresolved' (either resolved or rejected)?

When multiple Deferred objects are passed to jQuery.when, the method returns the Promise from a new "master" Deferred object …

javascript jquery rest jquery-deferred