aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax/ajax.js
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2007-01-22 03:49:04 +0000
committerJohn Resig <jeresig@gmail.com>2007-01-22 03:49:04 +0000
commitc39d1a21c61982baf511f6455047f7f055b228da (patch)
tree5289e93616f83c819d817e49466fc90e949dd2fb /src/ajax/ajax.js
parent34c0bed54a5ad812b1f78a85529164e0085f50d7 (diff)
downloadjquery-c39d1a21c61982baf511f6455047f7f055b228da.tar.gz
jquery-c39d1a21c61982baf511f6455047f7f055b228da.zip
Fixed doing $.post() without any params.
Diffstat (limited to 'src/ajax/ajax.js')
-rw-r--r--src/ajax/ajax.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ajax/ajax.js b/src/ajax/ajax.js
index b872481ab..346fdd71e 100644
--- a/src/ajax/ajax.js
+++ b/src/ajax/ajax.js
@@ -391,6 +391,11 @@ jQuery.extend({
* @cat Ajax
*/
post: function( url, data, callback, type ) {
+ if ( jQuery.isFunction( data ) ) {
+ callback = data;
+ data = {};
+ }
+
return jQuery.ajax({
type: "POST",
url: url,