开发者

"unresolving" a deferred object

开发者 https://www.devze.com 2023-02-12 06:53 出处:网络
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 defe

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 hav开发者_StackOverflow社区e all the callbacks react. Is that possible?

Cheers


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号