This is my HTML table with all the buttons on click of one button show another button immediately in the same row this is my code but I don't know how I need to make this work
<table id="example" class="stripe row-border order-column" width="100%">
<thead>
<tr>
<th>Drawing</th>
<th style="display:none">Overview</th>
<th>Stage</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>BW101-01</td>
<td>1</td>
<td><button type="button" class="clarify">Clarify</button>
<button type="button" class="allott">Allott</button>
<p id="satge3">Started / Paused</p>
<button type="button" class="correctit">correctit</button>
<button type="button" class="send">send</button></td>
</tr>
<tr>
<td>BW102-02</td>
<td>2</td>
<td> <button type="button" class="clarify">Clarify</button>
<button type="button" class="allott">Allott</button>
<p id="satge3">Started / Paused</p>
<button type="button" class="correctit">correctit</button>
<button type="button" class="send">send</button></td>
</tr>
</tbody>
</table>
on click of the one button in table show another button which row button is clicked
This is my JQuery
$(document).ready(function(e) {
var table = $('#example').DataTable();
**var Stage = 1; //i get this from database**
alert(Stage);
if (Stage == 1) {
$(".allott").hide();
$(".clarify").show();
$(".satge3").hide();
$(".correctit").hide();
$(".send").hide();
} else if (Stage == 2) {
$(".allott").show();
$(".clarify").hide();
$(".satge3").hide();
$(".correctit").hide();
$(".send").hide();
}
$('.clarify').on('click', function(e) {
$(".allott").show();
$(".clarify").hide();
$(".satge3").hide();
$(".correctit").hide();
$(".send").hide();
});
});
something like this I want to achieve JSFiddle