diff options
author | John Resig <jeresig@gmail.com> | 2007-01-14 06:22:20 +0000 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2007-01-14 06:22:20 +0000 |
commit | ed5bda3020bd418ad8edb477ad2b1fd8b313cc04 (patch) | |
tree | b0558e622f44b0c6976e93a93e49190357f61252 /src/ajax | |
parent | 2bd21fe3b3e1231b6364aec5e61d7009979c6a99 (diff) | |
download | jquery-ed5bda3020bd418ad8edb477ad2b1fd8b313cc04.tar.gz jquery-ed5bda3020bd418ad8edb477ad2b1fd8b313cc04.zip |
Added in jQuery.isFunction().
Diffstat (limited to 'src/ajax')
-rw-r--r-- | src/ajax/ajax.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ajax/ajax.js b/src/ajax/ajax.js index c1ad22eff..66519036d 100644 --- a/src/ajax/ajax.js +++ b/src/ajax/ajax.js @@ -44,7 +44,7 @@ jQuery.fn.extend({ * @cat Ajax */ load: function( url, params, callback, ifModified ) { - if ( url.constructor == Function ) + if ( jQuery.isFunction( url ) ) return this.bind("load", url); callback = callback || function(){}; @@ -55,7 +55,7 @@ jQuery.fn.extend({ // If the second parameter was provided if ( params ) // If it's a function - if ( params.constructor == Function ) { + if ( jQuery.isFunction( params.constructor ) ) { // We assume that it's the callback callback = params; params = null; @@ -273,7 +273,7 @@ jQuery.extend({ */ get: function( url, data, callback, type, ifModified ) { // shift arguments if data argument was ommited - if ( data && data.constructor == Function ) { + if ( jQuery.isFunction( data ) ) { callback = data; data = null; } |