JSFiddle - React, Tailwind, and code Playground

by hirenwebdp

HTML

<div id="products">
    <h1 id="ui-widget-header" class="ui-widget-header"><p align="center" style="font-size:30px;">Transaction 4: You put another $5,000  </p> </h1>
    <div class="ui-widget-content">
        <ul>
            	<li data-id="5" class = "seven" id="seven" ><a href="#" style="color:#FFFFFF;" class="button button-orange">Dr</a> </li>
			<li data-id="6" class = "eight" id="eight" ><a href="#" style="color:#FFFFFF;" class="button button-green">Cr</a> </li>
            <li data-id="1" class="third" id="third"><a href="#" style="color:#FFFFFF;" class="button button-orange"> Bank </a></li>
            <li data-id="2" class = "fourth" id="fourth" > <a href="#" style="color:#FFFFFF;" class="button button-green">Owner's euity</a> </li>
            <li data-id="3" class = "fifth" id="fifth" ><a href="#" style="color:#FFFFFF;" class="button button-orange">5000</a> </li>
            <li data-id="4" class="sixth" id="sixsth"> <a href="#" style="color:#FFFFFF;" class="button button-green">5000 </a></li>
		
        </ul>
    

<table width="100%">
    <tr><td>
<table width="100%" border=1>
    <tr>
        <td  width : '33%'><div id="shoppingCart1" class="shoppingCart">
    <div align="center" class="ui-widget-content">
       <ol id="amt1" style="list-style:none">
            <li class="placeholder">&nbsp;<br><br></li>
        </ol>
    </div>
</div>
     </td>
        <td><div id="shoppingCart2" class="shoppingCart">
    <div align="center" class="ui-widget-content">
       <ol id="amt1" style="list-style:none">
            <li class="placeholder">&nbsp;<br><br></li>
        </ol>
    </div>
</div>
        </td>
    </tr>
    <tr>
        <td><div id="shoppingCart3" class="shoppingCart">
    <div align="center" class="ui-widget-content">
       <ol id="amt1" style="list-style:none">
            <li class="placeholder">&nbsp;<br><br></li>
        </ol>
    </div>
</div>
     </td>
        <td><div id="shoppingCart4" class="shoppingCart">
  
    <div...

CSS

#products{font: 13px/20px 'Lucida Grande', Verdana, sans-serif;
  color: #404040;
  background: #f2f8fc;}
li.ui-draggable-dragging{
   list-style:none;
}
.ui-widget-content ul li
{
    display: block;
	float: left;
	line-height: 30px;
	list-style:none;
	margin: 0 0px;
    text-decoration:blink;
}
.ui-widget-content
{
   min-height:40px;
    
}
.hidden{
    visibility:hidden;
}
#equal
{display:none;
}
#bal
{display:none;
}
#e1
{display:none;
}
.button-purple {
  background: #9966cb;
     color:#FFFFFF;
  border-color: #8040be #8040be #733aab;
  background-image: -webkit-linear-gradient(top, #a87dd3, #9966cb 66%, #8f57c6);
  background-image: -moz-linear-gradient(top, #a87dd3, #9966cb 66%, #8f57c6);
  background-image: -o-linear-gradient(top, #a87dd3, #9966cb 66%, #8f57c6);
  background-image: linear-gradient(to bottom, #a87dd3, #9966cb 66%, #8f57c6);
}
.button-purple:active {
  background: #9966cb;
     color:#FFFFFF;
  border-color: #733aab #8040be #8040be;
}
.button {
  position: relative;
  display: inline-block;
  vertical-align: top;
  height: 36px;
  line-height: 35px;
  padding: 0 20px;
  font-size: 20px;
  color:#FFFFFF;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 -1px rgba(0, 0, 0, 0.4);
  background-clip: padding-box;
  border: 1px solid;
  border-radius: 2px;
  cursor: pointer;
  -webkit-box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 1px 2px rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 1px 2px rgba(0, 0, 0, 0.25);
}
.button:before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
     color:#FFFFFF;
  pointer-events: none;
  background-image: -webkit-radial-gradient(center top, farthest-corner, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  background-image: -moz-radial-gradient(center top, farthest-corner, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
 ...

JavaScript

$("#products li").draggable({
    appendTo: "body",
    helper: "clone"
  
});
$("#credit").sortable({
    receive: function (event, ui) {
        ui.item.remove();  
        $("#e1").show();
      $("#e1").html(s);
        setTimeout('$("#e1").hide()',1500);
    }
});
$( "#credit" ).draggable({
revert: true,
  start: function( event, ui ) {   
       var s="PLEASE SELECT ANOTHER BLOCK";
      $("#e1").show();
      $("#e1").html(s);
        setTimeout('$("#e1").hide()',1500);
       }
});
$( "#credit0" ).draggable({
revert: true,
  start: function( event, ui ) {
            var s="PLEASE SELECT ANOTHER BLOCK";
      $("#e1").show();
      $("#e1").html(s);
        setTimeout('$("#e1").hide()',15000);
       }
});
$( "#credit3" ).draggable({
revert: true,
  start: function( event, ui ) {
            var s="PLEASE SELECT ANOTHER BLOCK";
       $("#e1").show();
      $("#e1").html(s);
        setTimeout('$("#e1").hide()',1500);
       }
});
$( "#credit1" ).draggable({
revert: true,
  start: function( event, ui ) {
           var s="PLEASE SELECT ANOTHER BLOCK";
       $("#e1").show();
      $("#e1").html(s);
        setTimeout('$("#e1").hide()',1500);
       }
});
$("#shoppingCart1 ol").droppable({
    activeClass: "ui-state-default",
    hoverClass: "ui-state-hover",
    accept:".seven",
    drop: function(event, ui) {
        $("#e1").hide();
        var self = $(this);
        self.find(".placeholder").remove();
        var productid = ui.draggable.attr("data-id");
        if (self.find("[data-id=" + productid + "]").length) return;
        $("<li></li>", {
            "text": ui.draggable.text(),
            "data-id": productid
        }).appendTo(this);
             $("#equal").hide();
        
        // To remove item from other shopping chart do this
        var cartid = self.closest('.shoppingCart').attr('id');
        $(".shoppingCart:not(#"+cartid+") [data-id="+productid+"]").remove();
             var sum1 = 0;
       ...