Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"unresolving" a deferred object

In short, is there a way to "unresolve" a deferred object?

For example: We have a list of data that needs to be updated periodically, or when an event is triggered. It would be great to take a deferred object created with .ajax() and pass it's promise around to gather callbacks. Then "fire" that ajax request whenever we want and have all the callbacks react. Is that possible?

Cheers

like image 380
nicholas Avatar asked Feb 18 '11 01:02

nicholas


1 Answers

As of jQuery 1.7, there is progress() that can be used for multi-fire situations.

like image 119
Ates Goral Avatar answered Nov 05 '22 17:11

Ates Goral