Skip to content
Permalink
Browse files

jquery ajax: closes #2452. get() and post() weren't shifting all argu…

…ments correctly.
  • Loading branch information
flesler committed Sep 15, 2009
1 parent 183f37e commit 5b9214e7d8db9759471dd95822a207a8653b48a3
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/ajax.js
@@ -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 = {};
}

0 comments on commit 5b9214e

Please sign in to comment.
You can’t perform that action at this time.