Repeat calls with jsonpCallback break
If you do a jsonp request followed by another jsonp request, with jsonpCallback set, the callback function is deleted before the second request completes.
Example:
- $.ajax({
- url: "1.json",
- success: function(){
- $.ajax({url: "2.json", jsonpCallback: "C", dataType: "jsonp", success: function(){} })
- },
- jsonpCallback: "C",
- dataType: "jsonp"
- });
An easy solution would be to have the garbage collection happen before success is called.