开发者

I want to change the position of rows of table

I am having data in the .php page inside a table in the form of various rows. I want to facilitate that user can change the position of these rows by dragging the rows vertically.how it is poss开发者_开发百科ible using jQuery.

Suggest me some plugin or some tutorial link so that i can do so.

i am following this tutorial but i cannot figure out how to make the row position persistent in the databse.SO that next tiume when user came to that page he will see the same arrangement of rows

I m using this tutorial http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/

Thanks in adv.


I have used the Table Drag and Drop jQuery plugin in the past. It works very well.

Edit: Added example

This is how I sent the new row order to the PHP script which saves it in the database:

$(document).ready(function() {
    // Initialise the drag-and-drop
    $("#table3").tableDnD({
        // Set the action to perform when the mouse button is released
        onDrop: function(table, row) {
            $("#AjaxResult").load("list_sort.php?list_id=3&"+$.tableDnD.serialize());
        }
    });
});


this article may help u

personally prefer

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜