Remove items from droppables list
I cannot find any working function to remove items dropped into a drop area using jQuery droppables. Has anyone done this and had success?
Here is the code I have for mine without the remove function:
-
<script type="text/javascript">
$(document).ready( function(){
$(".red, .green").draggable({helper: 'clone'});
$(".drop").droppable({
accept: ".green",
activeClass: "droppable-active",
drop: function(ev, ui) {
$(this).append("<input type="text" value='Green'></input>");
}
});
$(".drop").droppable({
accept: ".red",
activeClass: "droppable-active",
drop: function(ev, ui) {
$(this).append("<input type="text" value='Red'></input>");
}
});
});
</script>
Will appreciate any help! Thanks!