jquery - how to make droppable recognise when the draggable leaves? -



jquery - how to make droppable recognise when the draggable leaves? -

i seek create drag , drop game need order draggables. may alter position of 1 time dropped draggable.

so need 1. droppable recognise when draggable dropped on , disabled 2. droppable recognise when dropped draggable has left , droppable again.

i have far first part. sec can't manage...

$(".boxsentence").each( function(){ $(this).droppable({ activeclass: "highlight", drop: $(this).addclass("noborder occupied"); $(this).droppable("disable"); numoccupied++; } });

i have tried "out", works other way.

if has ideas, appreciate it.

i don't know if nice method.... think, found way.

i made other object droppable (obj2) , when drop draggable it's previous location (obj1) onto it, triggers activation of obj2

$(".obj2").droppable({ drop: function(event,ui){ $(".obj1").droppable("enable"); numoccupied--; } }); .... $(".obj1").each(function(){ $(this).droppable({ drop: $(this).addclass("noborder occupied"); $(this).droppable("disable"); numoccupied++; )}; )};

if there nicer way i'd glad hear ideas!

jquery droppable

Comments

Popular posts from this blog

java Multi query from Mysql using netbeans -

c# - DotNetZip fails with "stream does not support seek operations" -

c++ - StartServiceCtrlDispatcher don't can access 1063 error -