JSFiddle - React, Tailwind, and code Playground
by cneeds
HTML
<script src="http://www.inandrias.biz/javascripts/jquery-ui-1.8.22.custom.min.js" type="text/javascript"></script>
<div id="menudiv"></div>
<div id="programWindow" class="programWindow">
<table style="display: inline-block; float: left;">
<tbody>
<tr>
<td class="NOTpg-droppable" id="dropCellCount001">
<table>
<tbody>
<tr>
<td class="pg-droppable" id="dropCellCount002">
<label for="Insurer">Insurer</label>
<input id="Insurer" name="Insurer" title="Select the Insurer on this policy" tabindex="1" readonly="readonly" autocomplete="off" placeholder="Insurer" maxlength="10" autofocus="" type="text">
</td>
<td class="pg-droppable padbot3" id="dropCellCount003" valign="bottom">
<label for="SelectInsurer"> </label>
<br>
<a href="#" id="Insurer_1" class="selectBttnA" name="Insurers"><span> </span></a>
</td>
<td class="pg-droppable" id="dropCellCount004" style="text-align:right; line-height: 15px;" valign="bottom">
<label for="Policy<br ></label>number">Policy<br>number</label>
</td>
<td class="pg-droppable" id="dropCellCount005" colspan="2" valign="bottom">
<input id="PolicyNumber" onfocus="enableInput('PolicyNumber')" onblur="disableInput('PolicyNumber')" class="w140" name="PolicyNumber" title="Lead Insurer's policy number" tabindex="2" autocomplete="off" placeholder="Policy number" maxlength="20" style="text-transform: uppercase;" type="text">
</td>
</tr>
<tr>
<td class="pg-droppable" id="dropCellCount006">
<label for="Product">Product</label>
<input id="Product" name="Product" title="Select this policy's Product" tabindex="3" readonly="readonly" autocomplete="off" placeholder="Product" maxlength="10" type="text">
</td>
<td class="pg-droppable padbot3" id="dropCellCount007" valign="bottom">
<label for="SelectProduct"> </label>
<br>
<a href="#" id="Product_1" class="selectBttnA" data="ICode #Insurer" name="Products"><span> </span></a>
</td>
<td class="pg-droppable" id="dropCellCount008" style="text-align:right; line-height: 15px;"...
CSS
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td {
margin: 0px;
padding: 0px;
}
body {
margin:0px;
margin-left:30px;
font:13px/16px "Lucida Grande", Arial, Sans-serif;
color: #fff;
background-color: #cfcfcf;
}
div {
border-radius:5px;
background-color: #00CCFF;
border:1px solid;
border-color:white;
text-align:center;
}
div.menuAll {
text-shadow:1px 1px 0 #3366ff;
width:97%;
padding: 3px;
color: white;
}
.dialogDiv {
text-align: left;
padding: 5px;
}
.dialogDiv a {
text-decoration:none;
}
.width300 {
width:300px!important;
padding-top: 7px!important;
padding-bottom: 7px!important;
}
.nopadormarg {
padding: 0;
margin: -1px 0 0;
border-style:none;
}
h1 {
margin-left: 3px;
margin-right: 3px;
font-size: 26px;
}
h2 {
font-size: 22px;
}
p {
margin: 0 0 -1px;
}
#loggedInAs {
white-space:nowrap;
}
#menudiv {
padding:10px 0px 12px;
*font-size:11px;
line-height:18px;
text-align:left;
margin: 5px 2px;
}
#menudiv a.menuA {
-moz-border-radius:4px;
-webkit-border-radius:4px;
border-radius:4px;
background:#39d url('images/bg-btn-blue.png') repeat-x scroll 0 0;
border:1px solid #39D;
color: #fff;
text-shadow:0 -1px 0 #39d;
padding:4px 10px 5px;
font-size:14px;
margin:0 5px 0px 5px;
font-weight:bold;
text-decoration:none;
}
#menudiv a.menuB {
-moz-border-radius:4px;
-webkit-border-radius:4px;
border-radius:4px;
background:#39d url('images/bg-btn-blue.png') repeat-x scroll 0 0;
border:1px solid #39D;
color:#fff;
text-shadow:0 -1px 0 #39d;
padding:4px 10px 5px;
font-size:14px;
margin:0 5px 0 5px;
font-weight:bold;
text-decoration:none;
}
#menudiv a.menuA:hover {
text-decoration:none;
background-position:0 -5px;
cursor:pointer;
margin:0 1px 0 5px;
padding:4px 12px 6px;
}
#menudiv a.menuB:hover {
text-decoration:none;
background-position:0 -5px;
cursor:pointer;
margin:0 1px 0 5px;
padding:4px 12px 6px;
}
#menudiv a.menuA-open...
JavaScript
document.getElementById('programWindow').style.display="block";
$('#programWindow').clone().attr('id', 'programWindow' + 'test').appendTo('#menudiv').show();
$('#programWindow').hide();
$(function() {
$( ".pg-draggable" ).draggable({
helper: 'clone',
revert: 'invalid',
cancel: null,
opacity: 0.8,
scroll: true
});
$( ".pg-droppable" ).droppable({
accept: ".pg-draggable",
activeClass: "ui-state-hover",
hoverClass: "ui-state-active"
});
});
$( ".pg-droppable" ).on( "drop", function(event, ui) {
// $( this ).next( "td" );
alert($( this ).attr( "id" ));
$draggedItem = ui.draggable.clone();
$draggedItem.insertAfter( $(this) );
});