Plugins

User login
Can't find a Plugin?

Can't find a Plugin you are looking for? Check out the jQuery Wiki page.

Are you a plugin developer? Please move your plugin over to this site.

Website Bug or Feature Request?

Found a bug on the new jQuery Plugin website? Have a feature request?

Submit it to the jQuery Plugin website issue queue to ensure it is noticed!

dragging row past top leaves it at the bottom


Project:Table row drag and drop
Version:0.5
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

If you drag a row upwards just a little too far into (over) the header row, then it snaps to the bottom when you start to correct it. When you actually correct it by moving the cursor over the top position, the row can only be dragged to the second top position.

Example pseudo code (just pasted, no valid html document)

<script type="text/javascript" src="jquery-1.2.6.pack.js"></script>
<script type="text/javascript" src="jquery.tablednd_0_5.js"></script>

$(document).ready(function() {

  $("#tableID").tableDnD( {
  onDrop: function(table, row) {
              // some drop event handler functionality
    }
  });
});

    <table id="tableID">
<thead>
<tr>
<th>Column1</th>
<th>Column2</th>

</tr>
</thead>
<tbody>

<tr id="190" class="even">
<td><a href="#">Name1</a></td>
<td>second colum1</td>
</tr>

<tr id="191" class="odd">
<td><a href="#">Name2</a></td>
<td>second colum2</td>
</tr>

<tr id="192" class="even">
<td><a href="#">Name3</a></td>
<td>second colum3</td>
</tr>
            </tbody>
</table>

Comments

#1

Just want to add I was using IE 7 (Version 7.0.5730.13)

#2

additionally the problem seems to appear only if there is a thead section. When the table contains on normal rows without an extra header then this problem does not occur.