Opened 13 years ago
Closed 12 years ago
#6552 closed bug
ajaxSetup for data not work of get method
Reported by: | velna_007 | Owned by: | velna_007 |
---|---|---|---|
Priority: | undecided | Milestone: | 1.5 |
Component: | ajax | Version: | 1.4.2 |
Keywords: | ajaxSetup | Cc: | |
Blocked by: | Blocking: |
Description
call: $.ajaxSetup({data:{ajax=1}})
then every call on $.post will add ajax=1 parameter, but call on $.get does't
in version 1.4.2 line 4888:
get: function( url, data, callback, type ) {
shift arguments if data argument was omited if ( jQuery.isFunction( data ) ) {
type = type callback; callback = data; data = null;
}
return jQuery.ajax({
type: "GET", url: url, data: data, success: callback, dataType: type
});
},
it should be :
get: function( url, data, callback, type ) {
shift arguments if data argument was omited if ( jQuery.isFunction( data ) ) {
type = type callback; callback = data; data = {};
}
return jQuery.ajax({
type: "GET", url: url, data: data, success: callback, dataType: type
});
},
Change History (4)
comment:1 Changed 13 years ago by
comment:2 Changed 12 years ago by
Priority: | → undecided |
---|
Can you please supply a reduced test case of this on jsFiddle?
comment:3 Changed 12 years ago by
Milestone: | 1.4.3 → 1.5 |
---|---|
Owner: | set to velna_007 |
Status: | new → pending |
comment:4 Changed 12 years ago by
Status: | pending → closed |
---|
Automatically closed due to 14 days of inactivity.
also not work of $.load function
in version 1.4.2 line 1809: params = null; should be : params = {};