jquery ajax: closes #2452. get() and post() weren't shifting all arguments correctly.
This commit is contained in:
parent
183f37e4b4
commit
5b9214e7d8
|
@ -111,8 +111,9 @@ jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".sp
|
|||
jQuery.extend({
|
||||
|
||||
get: function( url, data, callback, type ) {
|
||||
// shift arguments if data argument was ommited
|
||||
// shift arguments if data argument was omited
|
||||
if ( jQuery.isFunction( data ) ) {
|
||||
type = callback;
|
||||
callback = data;
|
||||
data = null;
|
||||
}
|
||||
|
@ -135,7 +136,9 @@ jQuery.extend({
|
|||
},
|
||||
|
||||
post: function( url, data, callback, type ) {
|
||||
// shift arguments if data argument was omited
|
||||
if ( jQuery.isFunction( data ) ) {
|
||||
type = callback;
|
||||
callback = data;
|
||||
data = {};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue