I have 4 droppable blocks and 1 draggable image, how to achive effect of revertion, only if the I dropped my image not into droppable element?
I used this options, but can't reach wished result:
- $('.myimage').draggable({
scope: "tasks",
revert: true,
revertDuration: 1,
stop: function(event, ui) { }
});
$('.keeper').droppable({
accept: ".card",
scope: "tasks",
tolerance: "fit",
greedy: true,
drop: function(event, ui) {
$(this).css("background-color","green");
//$('.card').draggable({ scope: "tasks", revert: false });
}
});
so as you can see the revert set to "true", and when I dropped image not into .keeper, I have the revertion effect, and it's works fine untill I'm not drop .myimage to .keeper, after that I can dropping .myimage to everywhere on the page (revert doesn't work anymore), but I'm still need that .myimage was with this feature as for non-.keeper class elements, I hope you understand what I want.