JSFiddle - React, Tailwind, and code Playground

by Manju06

HTML

<script src="https://code.jquery.com/jquery-3.4.1.slim.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.css">

<body>

<h1>Events</h1>

<table class="MainTable">
  <tr>
    <th>Month</th>

  </tr>
  
  <tr class="row">
    <td>January
    </td>
    <td>Events</td>
    <td>
      This is information I want to show as modal when this January cell is clicked
    </td>    
  </tr>
  
   <tr class="row">
    <td>
      February
    </td>
    <td>Events</td>
    <td>
      This is information I want to show as modal when this February cell is clicked
    </td>    
  </tr>

</table>
 
</body>

CSS

.MainTable, tr, td {
  border:1px solid red;
  width:80%;
}
.row td{
  display:flex;


  width:100%;
}

JavaScript

$(".MainTable tr").click(function() {
   alert($(this).children("td").text());
});