SaneMethod / jquery-ajax-localstorage-cache

Ajax Cache backed by localStorage for jQuery
Other
379 stars 79 forks source link

Success function array fails: TypeError: object is not a function #21

Closed markokeeffe closed 9 years ago

markokeeffe commented 10 years ago

jQuery.ajax() API allows for an array of success functions to be specified:

As of jQuery 1.5, the success setting can accept an array of functions. Each function will be called in turn.

The following line is incompatible with this:

if ( options.realsuccess ) options.realsuccess( data );
SaneMethod commented 9 years ago

I think this is moot now, given that adding success callbacks (in an array or otherwise) is deprecated, and that we've added support for jQuery Deferred - you can just hang as many .done or .fail blocks off of the request as you like.