diff --git a/ui/jquery.ui.droppable.js b/ui/jquery.ui.droppable.js index 08654aaa0..7ee899820 100644 --- a/ui/jquery.ui.droppable.js +++ b/ui/jquery.ui.droppable.js @@ -64,7 +64,12 @@ $.widget( "ui.droppable", { /** internal **/ _start: function( event ) { - if ( this.options.accept && !$( event.target ).is( this.options.accept ) ) { + if ( typeof this.options.accept === 'function' ) { + if ( this.options.accept.call( this.element, event.target ) !== true ) { + return false; + } + } + else if ( this.options.accept && !$( event.target ).is( this.options.accept ) ) { return false; }