Fixed doing $.post() without any params.
authorJohn Resig <jeresig@gmail.com>
Mon, 22 Jan 2007 03:49:04 +0000 (03:49 +0000)
committerJohn Resig <jeresig@gmail.com>
Mon, 22 Jan 2007 03:49:04 +0000 (03:49 +0000)
src/ajax/ajax.js

index b872481..346fdd7 100644 (file)
@@ -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,