JSFiddle - React, Tailwind, and code Playground
by hongyang1033
HTML
<table class = "intel-table intel-sortable">
<thead>
<tr>
<th colspan="5">Description</th>
<th>Comment</th>
<th>User</th>
<th>Reviewer</th>
<th>Status</th>
</tr>
</thead>
<tbody style = "border-top : 1px solid #D3D8DB">
<tr>
<td >
<span style = "font-weight:bold ">Partition: </span>
<span style = "font-weight:bold" id="partition">parfisssa</span>
<!-- <label class = "label">Partition: parfia</label>-->
</td>
<td style="border-left:none"><span style = "font-weight:bold ">SIP: </span>
<span style = "font-weight:bold" class = "sip">csme</span></td>
<td rowspan="4"><input type="checkbox" value="emulation" id = "emulation"><label class = "label" style="padding-left:0px">Emulation</label></td>
<td rowspan="4"><input type="checkbox" value="simulation" id = "simulation"><label class = "label" style="padding-left:0px">Simulation</label></td>
<td rowspan="4"><input type="checkbox" value="synthesis" id = "synthesis" ><label class = "label" style="padding-left:0px">Synthesis</label></td>
<td rowspan="4"><textarea maxlength="180" class="animated" id="usercomment" name="usercomment" style="overflow: hidden; word-wrap: break-word; resize: horizontal; height: 80px; width:280px;"></textarea></td>
<td rowspan="4" align = "center" id = "user">Muhammad Aiman Bin Abdullah<br><label class = "label label-primary" id = "submit">Submit</label></td>
<td rowspan="4" align = "center" id = "reviewer">Jonathon<br><label class = "label label-primary" disabled>Review</label></td>
<td rowspan="4" align = "center"><img src="images/007c.png" alt=""><br>Not Reviewed</td>
</tr>
<tr>
<td colspan="2" class="def"><span style = "font-weight:bold ">Define: </span>
<span style = "font-weight:bold" id = "define">vlv_clock_vlv_clock</span></td>
</tr>
<tr>
<td colspan="2" class ="unixpath"><label class...
CSS
.label-primary
{
cursor: pointer;
}
/* $(this).attr('data-fullText') */
JavaScript
$("#submit").click(function() {
var myDate = new Date();
var displayDate = (myDate.getMonth()+1) + '/' + (myDate.getDate()) + '/' + myDate.getFullYear() + ' ' + myDate.getHours() + ':' + myDate.getMinutes();
var $row = $(this).closest("tbody");
// Find the tbody
var $partition= $row.find("#partition").text();
var $sip = $row.find("#sip").text();
var $define = $row.find('#define').text();
var $usercomment = $row.find("#usercomment").val();
var $emulation = $row.find('#emulation').is(":checked");
var $simulation = $row.find('#simulation').is(":checked");
var $synthesis = $row.find('#synthesis').is(":checked");
var $unixpath = $row.find('#unixpath').data('unixpath');
var $sambapath = $row.find('#sambapath').attr('data-sambapath');
var $user = $row.find('#user').text();
var $reviewer = $row.find('#reviewer').text();
$row.find("#commentArea5903,#emulation,#simulation,#submit").prop('disabled', true);
// console.log($row);
alert ($reviewer);
// alert($user);
//alert (displayDate);
});