s.data = jQuery.param( s.data, s.traditional );
}
- // If the jsonpCallback has been set, we can assume that dataType is jsonp
- // Ticket #5803
- if ( s.jsonpCallback ) {
- s.dataType = "jsonp";
- }
-
// Handle JSONP Parameter Callbacks
if ( s.dataType === "jsonp" ) {
if ( type === "GET" ) {
plus();
}
});
-
- // Supports Ticket #5803
- jQuery.ajax({
- url: "data/jsonp.php",
- jsonpCallback: "jsonpResults",
- success: function(data){
- ok( data.data, "JSON results returned without dataType:jsonp when jsonpCallback is defined" );
- plus();
- },
- error: function(data){
- ok( false, "Ajax error JSON (GET, custom callback name)" );
- plus();
- }
- });
-
});
test("JSONP - Custom JSONP Callback", function() {