views:

63

answers:

2

i am using this jquery to make a drag and drop sortable list. http://jqueryui.com/demos/sortable/ how i can catch the dragged event of elements ?

<script>

$(document).ready(function() { $("#sortable").sortable(); });

</script>

please help me.am not familiar with jquery.thanks in advance..i need to get the id of dragged element.

A: 

According to this page, you might use start or activate events.

TheVillageIdiot
A: 

Here's how to get the ID of the dragged element:

$('#sortable').sortable({
    stop: function(ui, event){
        var id = event.item.attr('id');
        alert(id);
    }
});
Simeon
thanks..it worked.....
Sijo