Functions / droppable
droppable(fn)
droppable( )
droppable(function fn)

droppable( )
return: object

droppable(function fn)
return: object
You can use fn(o), where o is dragged object
Code
<script type="text/javascript">
        function onload_2(idCanvas)
        {
                jc.start(idCanvas,true);
                jc.circle(30,30,20,'#ff0000',true)
                        .draggable();
                jc.rect(100,30,100,100)
						.droppable(function(){
							this.del();
						});
				jc.rect(100,140,100,80)
						.droppable(function(myCircle){
							myCircle.del();
						});
				
        }
        function start_2(idCanvas)      
        {      
			jc.clear(idCanvas);
			onload_2(idCanvas);
        }
        function stop_2(idCanvas)
        {
			jc.clear(idCanvas);
        }      
</script>
<canvas id="canvas_2" width="250px" height="265px"></canvas>
View