I am using jQuery UI Sortable widget for implementing drag and drop functionality in different rows of a table. I wish to change the id attribute of the row dragged (say row4) to that of the row that it displaces down(say row2). I can get the id of the object being dragged from the helper object that is passed to various callback functions, but how can I get the id of the row it finally displaces ?
There are certain rows between which some rows cannot be dragged and placed, and the check has been implemented using JavaScript which uses the id of the rows(and its various td*s*) to determine it. Its, therefore, very important that the ids of rows(and, consequently, its td*s*) reflect their new position.