Get the value of draggable element
<p>My code is as below:</p>

<pre><code> $(function() {
    $("#products li").draggable({
        cursor:'    move',
        opacity:    0.3,
        revert:     true,
        proxy:      'clone',
    });
    $("tr").droppable({
        drop:function(e,source){
            alert (source);
            var name = $("#products li").attr("id");
            alert (name);  
            var pid = $(this.draggable).attr("id") ;
            var add = $(this).text() ;
            var sum = pid+"-"+add;
            alert(sum);
             $.ajax({
                type:       "POST",
                url:        "add-shipment.php",
                data:       "address="+sum,
                success:    alert(sum+"has addes into database")
                });
        },
        out:function(){

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

<p>The problem is the list is generated dynamically by PHP. It only gives the <code>id</code> of the first element.</p>
