Here it is an example of a simple JavaScript /jQuery code that can be used to Drag and Drop table rows between two similar HTML tables (with the same number of columns), using jQuery UI. Click on codes to select them.

- The jQuery code (you must have jQuery and jQuery UI included before this code):
$(document).ready(function() {
  var $tabs = $('#t_draggable2')
    connectWith: ".t_sortable",
    items: "> tr:not(:first)",
    appendTo: $tabs,
    zIndex: 999990
  var $tab_items = $(".nav-tabs > li", $tabs).droppable({
    accept: ".t_sortable tr",
    hoverClass: "ui-state-hover",
    drop: function( event, ui ) { return false; }
- The HTML tables:
<table class="tables_ui" id="t_draggable1"><caption><h4>Table 1</h4></caption>
<tbody class="t_sortable">

<table class="tables_ui" id="t_draggable2"><caption><h4>Table 2</h4></caption>
<tbody class="t_sortable">
- CSS code to style the tables and the draggable items:
<style type="text/css">
.tables_ui {
  margin:2px 2%;
  border:2px solid #3333fe;
.tables_ui ul li {
  min-width: 200px;
.dragging li.ui-state-hover {
  min-width: 240px;
.dragging .ui-state-hover a {
  color:green !important;
  font-weight: bold;
.tables_ui th,td {
  text-align: right;
  padding: 2px 4px;
  border: 1px solid;
.t_sortable tr, .ui-sortable-helper {
  cursor: move;
.t_sortable tr:first-child {
  cursor: default;
.ui-sortable-placeholder {
  background: yellow;

• Here is the result (Click and drag the table rows from one table to the other):

Table 1

col_1 col_2 col_3 col_4
156 2668 100.95 1.82
256 618 10.35 1.82
789 28 105.8 15.89

Table 2

36 78 100.9 1.82
236 668 10.95 12.80

Daily Test with Code Example

Which tag adds a new line into a paragraph?
<b> <br> <p>
First line ...<br>
Other line...
Which CSS property can be used to add space between letters?
text-size word-spacing letter-spacing
#id {
  letter-spacing: 2px;
What JavaScript function can be used to get access to HTML element with a specified ID?
getElementById() getElementsByTagName() createElement()
var elm = document.getElementById("theID");
var content = elm.innerHTML;
Click on the "echo" correct instruction.
echo "" echo ""; echo """;
echo "Address URL:";
jQuery Drag and Drop Rows between two similar Tables

Last accessed pages

  1. Select in MySQL, Output results in HTML Table (1419)
  2. Golf Putt It In (739)
  3. Disable button and Enable it after specified time (5129)
  4. Flash Games - Free online Games (22975)
  5. Move image from an element /tag to another (1637)

Popular pages this month

  1. Qwop (3219)
  2. Get Attribute (ID, Class, Name, Title, Src) with jQuery (2547)
  3. Get the value of the selected /checked checkboxes in a form (1608)
  4. Insert, Select and Update NULL value in MySQL (1423)
  5. Add, Change, and Remove Attributes with jQuery (1301)