jQuery Table Drag’n Drop Plugin

jQuery Table Drag and Drop plugin simply adds drag’n drop functionality to tables.

Table drag’n dropping can’t be handled by standard drag’n dropping utilities as you need to move the whole row, not just the cell that receives the mouse events and re-parenting the row also requires specific code.

jQuery Table Drap Drop

This drag and drop plugin:

  • Allows the user to reorder rows within a table.
  • Individual rows can be marked as non-draggable and/or non-droppable.
  • Rows can have as many cells as necessary and the cells can contain form elements.

Standard usage is very simple:

$("#table-1").tableDnD();

After every drag’n drop event the new ordering values of the columns are returned as an array which you can send it as an Ajax query for updating the database.

9 Comments
  1. Reply Jeff Justice July 4, 2008 at 11:53 PM

    Thanks for telling us about the plugiin… It’s going to be very useful for me.

  2. Reply Matthew 'Web Design' Adams July 5, 2008 at 3:33 PM

    ~Cool plug-in. Nice one!

  3. Reply Daniel Schultz July 2, 2009 at 1:15 PM

    Right now, I am using this plugin to make a bus ticket system, so passengers can choose seats and drag them to an text input. Quite cool.

    Thanks

  4. Reply Constant Meiring October 17, 2009 at 1:55 PM

    Using this for the reordering of images on a CMS.

    Thanks!

  5. Reply Hery December 26, 2009 at 8:32 PM

    Good stuff. For now on, I will use this plugin for my dinamyc database table.

  6. Reply Seppo Hovi January 9, 2010 at 9:27 AM

    The (X)HTML-standard indicates that the ID-attribute cannot start with a number which seems to be the key requirement for this plugin to work. Please tell me I’m wrong?

  7. Reply Umut M. January 10, 2010 at 3:36 AM

    @Seppo,

    You’re right. But a simple modification in id names & how they are handled can fix it.

  8. Reply Dan Noorlander March 20, 2011 at 9:20 PM

    If you start the plugin through a function (there’s a reason for not wanting drag n drop on all the time), is there a ay to turn it off once it is called?

  9. Reply bird November 21, 2011 at 8:20 AM

    so cool

Leave a reply

Search