jquery ajax: addition for #2452. Wasn't working correctly in some cases.

This commit is contained in:
Ariel Flesler 2009-09-15 16:45:37 +00:00
parent 7638fc5835
commit cf8c1249d1
2 changed files with 8 additions and 5 deletions

View file

@ -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 = {};
}