It seems to me that you just need to drop '.abs:not(.outside)' into the accept parameter like this:
Working example
$('.abs').draggable(); $('.abs:not(.outside)').droppable({ accept: '.abs:not(.outside)', // Important bit hoverClass: "drop-hover", tolerance: "pointer", greedy: true, drop: function () { alert('drop'); } });
Or maybe this is more than what you need:
Working example 2
$('.abs').draggable(); $('.abs').droppable({ // Change here accept: '.abs:not(.outside)', // and here hoverClass: "drop-hover", tolerance: "pointer", greedy: true, drop: function () { alert('drop'); } });
source share