jquery-rss icon indicating copy to clipboard operation
jquery-rss copied to clipboard

Having BOTH the Success callback and the Final callback

Open johnmore opened this issue 12 years ago • 1 comments

Hello there, loving your script.

I really wanted to have both the Success callback and the Final callback since I needed to do different stuff with it.

For example I wanted to check the average color of an image on Success and change the background of its parent div to that color.

Then after everything is animated I want to resize the picture according to the size of the div and finally fadeIn the picture.

As of now it seems I can have only one or the other and would love to have both callbacks working.

Is there any way I can change the code to make that without breaking everything else?


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

johnmore avatar Feb 16 '14 19:02 johnmore

It looks like it's either/or for the callbacks. Line 25:

    this.callback = callback || this.options.success

I'm not sure, but maybe you could wrap the whole call the RSS plugin using a jQuery deferred object and then have a .done() function there be your final callback?

oakley808 avatar Feb 16 '14 19:02 oakley808