Commit 5b9214e7 authored by Ariel Flesler's avatar Ariel Flesler

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

parent 183f37e4
......@@ -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 = {};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment