Triggered when a draggable element is dropped.
Parameters
Name | Type | Description |
---|---|---|
e | {object} | event data |
Examples
sample
<style>
.draggable { border: 1px solid #999; width: 300px; height: 200px; text-align: center; }
.droppable { border: 1px solid #999; width: 300px; height: 200px; text-align: center; }
.drop { background-color: #FF0000; }
</style>
<div id="droppable" class="droppable">Drop Here</div>
<div id="draggable" class="draggable">Drag Me</div>
<script>
$('#draggable').draggable();
$('#droppable').droppable({ drop: function() { $(this).addClass('drop') } });
</script>