JSFiddle - React, Tailwind, and code Playground

by hirenwebdp

HTML

<div id="products">
    <h1 class="ui-widget-header"class="ui-widget-header"/>BALANCE SHEET FOR (NAME)’S BAKERY AS AT (TODAYS DATE)</h1>
    <div class="ui-widget-content">
         <ul>
            <li data-id="1" class = "owner"><a href="#" style="color:#FFFFFF;" class="button button-orange">21650</a> </li>
            <li data-id="2"class = "owner_syear"><a href="#" style="color:#FFFFFF;" class="button button-green">1500</a></li>
            <li data-id="3" class = "less_drawing"><a href="#" style="color:#FFFFFF;" class="button button-orange">3000</a> </li>
             <li data-id="4" class = "net_profit"><a href="#" style="color:#FFFFFF;" class="button button-green">500</a>  </li>
               <li data-id="5" class = "accumulated"><a href="#" style="color:#FFFFFF;" class="button button-orange">2000</a> </li>
            <li data-id="6" class = "represent_by"><a href="#" style="color:#FFFFFF;" class="button button-green">3000 </a></li>
              <li data-id="7" class = "assets"><a href="#" style="color:#FFFFFF;" class="button button-orange">1000</a> </li>
            <li data-id="8" class = "bank"><a href="#" style="color:#FFFFFF;" class="button button-green">300</a> </li>
              <li data-id="9" class = "computer"><a href="#" style="color:#FFFFFF;" class="button button-orange">50</a> </li>
             <li data-id="10" class = "oven"><a href="#" style="color:#FFFFFF;" class="button button-green">400</a> </li>
             <li data-id="11" class = "credit"><a href="#" style="color:#FFFFFF;" class="button button-orange">1000</a> </li>
             <li data-id="12" class = "iphone"><a href="#" style="color:#FFFFFF;" class="button button-green">9000 </a></li>
             <li data-id="13" class = "car"><a href="#" style="color:#FFFFFF;" class="button button-orange">3000 </a> </li>
            <li data-id="14" class = "less_liabilities"><a href="#" style="color:#FFFFFF;" class="button button-green">400</a> </li>
            <li data-id="15" class =...

CSS

#products{font: 13px/23px '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: 10px;
	list-style:none;
	margin: 0 02px;
    text-decoration:blink;
    min-height:40px;
}


.button {
  position: relative;
  display: inline-block;
  vertical-align: top;
  height: 30px;
  line-height: 30px;
  padding: 0 20px;
  font-size: 10px;
  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));
  background-image: -o-radial-gradient(center top, farthest-corner, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  background-image: radial-gradient(center top, farthest-corner, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
}
.button:hover:before {
  background-image: -webkit-radial-gradient(farthest-corner, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.03));
  background-image: -moz-radial-gradient(farthest-corner, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.03));
  background-image: -o-radial-gradient(farthest-corner, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.03));
  background-image: radial-gradient(farthest-corner, rgba(255,...

JavaScript

$("#products li").draggable({
    appendTo: "body",
    helper: "clone"
});
$("#shoppingCart1 ol").droppable({
    activeClass: "ui-state-default",
    hoverClass: "ui-state-hover",
     containment: "document",
        revert: true,
        accept:".assets1",
    drop: function(event, ui) {
        var self = $(this);
                     contents = $(this).attr('#shoppingCart1 ol li');
        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);
        $("#list").append(ui.draggable.text());
               var sum = 0;
        self.find('li').each(function(index)
                     {
                         sum += parseInt($(this).text());
                     });
        $('#total').text(sum);
//place1 sum
         var sum1 = 0;
        var pattern="";
        var matches="";
        $('#place1').find('li').each(function(index)
                     {var pattern = /[0-9]+/g;
                      var matches = $(this).text().match(pattern);
                         sum1 += parseInt(matches);
                     });
        $('#t1').text(sum1);
        
               // To remove item from other shopping chart do this
        var cartid = self.closest('.shoppingCart').attr('id');
        $(".shoppingCart:not(#"+cartid+") [data-id="+productid+"]").remove();
    }
}).sortable({
    items: "li:not(.placeholder)",
    sort: function() {
        $(this).removeClass("ui-state-default");
    }
});

$("#shoppingCart2 ol").droppable({
    activeClass: "ui-state-default",
    hoverClass: "ui-state-hover",
     containment: "document",
        revert: true,
        accept:".assets2",
    drop: function(event, ui) {
        var self = $(this);
                     contents = $(this).attr('#shoppingCart2 ol li');
       ...