data = undefined;
}
- return jQuery.ajax({
+ // The url can be an options object (which then must have .url)
+ return jQuery.ajax( jQuery.extend({
url: url,
type: method,
dataType: type,
data: data,
success: callback
- });
+ }, jQuery.isPlainObject( url ) && url ) );
};
});
});
});
+ asyncTest( "jQuery[get|post]( options ) - simple with xml", 2, function() {
+ jQuery.when.apply( jQuery,
+ jQuery.map( [ "get", "post" ] , function( method ) {
+ return jQuery[ method ]({
+ url: url( "data/name.php" ),
+ data: {
+ "xml": "5-2"
+ },
+ success: function( xml ) {
+ jQuery( "math", xml ).each(function() {
+ strictEqual( jQuery( "result", this ).text(), "3", "Check for XML" );
+ });
+ }
+ });
+ })
+ ).always(function() {
+ start();
+ });
+ });
+
//----------- jQuery.active
test( "jQuery.active", 1, function() {