Trigger button on drop
<p>I have the following script</p>

<pre><code>$(function() {
        $(".draggable").draggable({
                revert: true
        });
        $("#droppable").droppable({
                over: function() {
                       $(this).css('backgroundColor', '#cedae3');
                },
                out: function() {
                        $(this).css('backgroundColor', '#CDAF95');
                },
                drop: function(e, ui) {

                      $(ui.draggable).trigger('click');

                }
        });
});
</code></pre>

<p>I have <strong>multiple draggables</strong>, everyone in one td. In each of the draggables I've got a button.</p>

<p>How can I trigger the button <strong>from the dropped draggable</strong> on drop? This isn't working: <code>$(ui.draggable).trigger('click');</code> Does anyone has any suggestions?</p>

<pre><code>&lt;td class="draggable" class="ui-widget-content"&gt;
                        &lt;form action="index.php" method="post"&gt;
                            &lt;?php echo $produs['nume_produs']; ?&gt;
                            &lt;hr /&gt;
                            Pret: &lt;?php echo $produs['pret']; ?&gt; lei
                            &lt;br /&gt;

                            &lt;input type="hidden" name="nume_produs" value="&lt;?php echo $produs['nume_produs']; ?&gt;" /&gt;
                            &lt;input type="hidden" name="produs_id" value="&lt;?php echo $produs['id']; ?&gt;" /&gt;
                            &lt;input type="hidden" name="pret" value="&lt;?php echo $produs['pret']; ?&gt;" /&gt;
                            &lt;input type="submit" name="adauga" class="adauga" value="Adauga"/&gt;
                        &lt;/form&gt;
                    &lt;td&gt;
</code></pre>
