JQuery UI Drop Disable on selected elements
- by Suneth Kalhara
i want to add drop limit on circles, i wrote a scrit for dragging circles
the problem is user can drop circle on another circle, i don't want to allow it,
simply i need to revert if the user drag and drop circle on another circle.
i write some codes for this. but this not working for me, it always revert the dropped circle.
here is my example url
http://webxtreams.net/demoprofiles004/circledragger.html
here is js code i run on fire bug
$(".circle").draggable({
revert: 'invalid'
});
$(".circle").droppable({
accept: function(el) {
return el.hasClass('.circle');
}
});
please help me to do that.
have another little question - can we track the reverting event on this, i need to repaint the lines when reverting the circle :)