I want to enable the option to drop out from droppable I actilly found exactly what I need here, but I am probebly using other library then his/ I want to "translate" the lined anser to the library that I am using. I am using this library
The code from the accepted answer:
$(".draggable").draggable({
cursor: "move",
revert: "invalid",
helper: "clone"
});
$(".droppable").droppable({
accept: '.draggable',
hoverClass: "ui-state-active",
drop: function (ev, ui) {
if ($(ui.draggable).hasClass('new')) {
$('.new').draggable({
revert: true
});
} else {
$(this).append($(ui.draggable).clone().draggable({
helper: "original"
}).addClass('new'));
}
},
out: function (event, ui) {
$(ui.draggable).fadeOut(1000, function () {
$(this).remove();
});
}
But I need something like
droppable.on('drag:start', () => {
$('.source-point').addClass('show');
//...
});
droppable.on('drag:stop', (evt) => {
$('.source-point').removeClass('show');
//...
});