JSFiddle - React, Tailwind, and code Playground

by Danish Farman

HTML

<script src="//code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<link rel="stylesheet" href="//stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"></script>
<script src="//stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="container">
  <div class="row">
    <div class="col">
      <table class="table table-responsive table-bordered table-hover">
        <thead>
          <tr>
            <td>Name</td>
            <td>Amount</td>
            <td>Actions</td>
          </tr>
        </thead>
        <tbody class="tbody">
          <tr>
            <td>Danish</td>
            <td>1000</td>
            <td><button class="btnEdit" type="button" onclick="edit(this)">
        Edit
        </button></td>
          </tr>
        </tbody>
      </table>
    </div>
    <div class="col message">

    </div>
  </div>
</div>

CSS

.row {
  background: #f8f9fa;
  margin-top: 20px;
}

.col {
  border: solid 1px #6c757d;
  padding: 10px;
}

JavaScript

$(function() {

  function edit(trow) {
    $(".message").html(JSON.stringify(trow));
  }

});