Firebug 在最后一行抛出错误。我想这是一个语法问题?我基本上是从本教程中复制的,不明白为什么它不起作用。
TypeError: ui.draggable is not a function
[Break On This Error]
ui.draggable({ containment: 'body'});
代码:
function handleDropbox(event, ui) {
$(this).append(ui.draggable); // put this first!!!
ui.draggable.addClass( 'selected' );
$(this).droppable( 'disable' );
ui.draggable.position( { of: $(this), my: 'center center', at: 'center center' } );
ui.draggable.draggable( 'option', 'revert', false );
ui.draggable({ containment: 'parent'});
}