diff options
author | Paul Bakaus <paul.bakaus@googlemail.com> | 2008-09-16 09:03:28 +0000 |
---|---|---|
committer | Paul Bakaus <paul.bakaus@googlemail.com> | 2008-09-16 09:03:28 +0000 |
commit | dc31bc2f3e8e31788cb10b59ba8fe691863022d8 (patch) | |
tree | f5368e0e10a6c2e2f5a4a8e035a0e779977e834d /ui/ui.droppable.js | |
parent | aed298125decb717e4b2b7527386997bde45cc50 (diff) | |
download | jquery-ui-dc31bc2f3e8e31788cb10b59ba8fe691863022d8.tar.gz jquery-ui-dc31bc2f3e8e31788cb10b59ba8fe691863022d8.zip |
use $.isFunction instead of checking the constructor
Diffstat (limited to 'ui/ui.droppable.js')
-rw-r--r-- | ui/ui.droppable.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/ui.droppable.js b/ui/ui.droppable.js index ab95bb334..839ac0311 100644 --- a/ui/ui.droppable.js +++ b/ui/ui.droppable.js @@ -18,7 +18,7 @@ $.widget("ui.droppable", { _setData: function(key, value) { if(key == 'accept') { - this.options.accept = value && value.constructor == Function ? value : function(d) { + this.options.accept = value && $.isFunction(value) ? value : function(d) { return d.is(accept); }; } else { @@ -32,7 +32,7 @@ $.widget("ui.droppable", { var o = this.options, accept = o.accept; this.isover = 0; this.isout = 1; - this.options.accept = this.options.accept && this.options.accept.constructor == Function ? this.options.accept : function(d) { + this.options.accept = this.options.accept && $.isFunction(this.options.accept) ? this.options.accept : function(d) { return d.is(accept); }; |