jquery ajax: addition for #2452. Wasn't working correctly in some cases.
This commit is contained in:
parent
7638fc5835
commit
cf8c1249d1
2 changed files with 8 additions and 5 deletions
|
@ -113,7 +113,7 @@ jQuery.extend({
|
|||
get: function( url, data, callback, type ) {
|
||||
// shift arguments if data argument was omited
|
||||
if ( jQuery.isFunction( data ) ) {
|
||||
type = callback;
|
||||
type = type || callback;
|
||||
callback = data;
|
||||
data = null;
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ jQuery.extend({
|
|||
post: function( url, data, callback, type ) {
|
||||
// shift arguments if data argument was omited
|
||||
if ( jQuery.isFunction( data ) ) {
|
||||
type = callback;
|
||||
type = type || callback;
|
||||
callback = data;
|
||||
data = {};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue