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 an image in web page?
<div> <img> <span>
<img src="" width="191" height="63" alt="Courses-Web" />
Which of these CSS codes displays the text oblique?
font-style: italic; text-decoration: underline; font-weight: 500;
#id {
  font-style: italic;
Click on the jQuery function used to hide with animation a HTML element.
click() hide() show()
$(document).ready(function() {
  $(".a_class").click(function(){ $(this).hide("slow"); });
Click on the correctly defined function in PHP.
fname function() {} function fname() {} function $fname() {};
function fname($a, $b) {
  echo $a * $b;
jQuery Drag and Drop Rows between two similar Tables

Last accessed pages

  1. Website Mini-Traffic and Pages Access data (1688)
  2. PHP PDO - exec (INSERT, UPDATE, DELETE) MySQL (44482)
  3. PHP-MySQL Scripts (4212)
  4. Script Users Register, Login, Online (16701)
  5. PHP getElementById and getElementsByTagName (25352)

Popular pages this month

  1. Making DIV Contents Scroll Horizontally, with multiple Div`s inside (2457)
  2. Contact page - CoursesWeb (2374)
  3. Tabs effect with CSS (2364)
  4. Insert, Select and Update NULL value in MySQL (1352)
  5. PHP getElementById and getElementsByTagName (931)