<p>I have an html like this:</p>

<pre><code>&lt;div id="container1"&gt;
    &lt;div class="dragme"&gt;drag me&lt;/div&gt;
&lt;/div&gt;
&lt;div id="container2"&gt;
    &lt;div class="dragme"&gt;drag me&lt;/div&gt;
&lt;/div&gt;
&lt;div id="droponme"&gt;&lt;/div&gt;

$(".dragme").draggable();
$("#droponme").droppable({
    accept: ".dragme",
    drop: function(e, u) { alert( /* find id of the container here*/ ); };
});
</code></pre>

<p>I want to find the container of the draggable object on drop event handler. How can I do this?</p>

```
```
$(".dragme").draggable();
$("#droponme").droppable({
    accept: ".dragme",
    drop: function(e, u) {
        alert(u.draggable.parent().attr('id') );
        // in your example: container1 or container2
    }
});
```
```