mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Ajax: $.post and $.get can now take an options object
Fixes gh-1986
Closes gh-1995
(cherry picked from commit 89ce0af2cf)
This commit is contained in:
committed by
Dave Methvin
parent
07719736b7
commit
26150f0910
@@ -2050,6 +2050,26 @@ module( "ajax", {
|
||||
});
|
||||
});
|
||||
|
||||
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() {
|
||||
|
||||
Reference in New Issue
Block a user