X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fajax%2Fajax.js;h=13ad01d40e738619ad6d6194b573db085acbb687;hb=513122442717ee350ce6e7ff6e7227cce54c0444;hp=5c48968fc0a71426df5178796e897b21737ea43f;hpb=cb53fc02b68ca267f9eddd8fd4f5d92ef08ae022;p=jquery.git diff --git a/src/ajax/ajax.js b/src/ajax/ajax.js index 5c48968..13ad01d 100644 --- a/src/ajax/ajax.js +++ b/src/ajax/ajax.js @@ -661,6 +661,16 @@ jQuery.extend({ * } * }); * + * @test stop(); + * $.ajax({ + * url: "data/with_fries.xml", dataType: "xml", type: "GET", data: "", success: function(resp) { + * ok( $("properties", resp).length == 1, 'properties in responseXML' ); + * ok( $("jsconf", resp).length == 1, 'jsconf in responseXML' ); + * ok( $("thing", resp).length == 2, 'things in responseXML' ); + * start(); + * } + * }); + * * @name $.ajax * @type jQuery * @param Hash prop A set of properties to initialize the request with. @@ -669,6 +679,8 @@ jQuery.extend({ ajax: function( type, url, data, ret, ifModified ) { // If only a single argument was passed in, // assume that it is a object of key/value pairs + var global = true; + var timeout = jQuery.timeout; if ( !url ) { ret = type.complete; var success = type.success; @@ -676,7 +688,7 @@ jQuery.extend({ var dataType = type.dataType; var global = typeof type.global == "boolean" ? type.global : true; var timeout = typeof type.timeout == "number" ? type.timeout : jQuery.timeout; - var ifModified = type.ifModified || false; + ifModified = type.ifModified || false; data = type.data; url = type.url; type = type.type;