Hi all, I'm trying to understand why
$('#title').replaceWith('ha');
will work outside the
drop: function(event, ui) {}
area in jquery's droppable script, but it won't work inside. Specifically, if I do
$(".droppable").droppable({
drop: function(event, ui) {
$('#title').replaceWith('ha');
}
I get a Runtime Error (line 1102) data(...).options is null or not an object
. Also if I insert a $('#title').append('ha');
inside the drop:, it works.
However if I put $('#title').replaceWith('ha');
anywhere else outside
$(".droppable").droppable({ /* */ });
it works?