JSFiddle - React, Tailwind, and code Playground

by VixedS

HTML

<table>
<tr data-id="5">            
    <td>
        <label style="position:relative"><input class="active status-color checkbox-slider yesno " title="no" type="checkbox" disabled="disabled"><span class="text">5</span></label>
    </td>
</tr>
<tr data-id="4">            
    <td>
        <label style="position:relative"><input class="active status-color checkbox-slider yesno " title="no" type="checkbox" disabled="disabled"><span class="text">4</span></label>
    </td>
</tr>
<tr data-id="3">            
    <td>
        <label style="position:relative"><input class="active status-color checkbox-slider yesno " title="no" type="checkbox"><span class="text">3</span></label>
    </td>
</tr>
</table>
<div id="form">
<button data-id="5">Set Id=5</button>
<button data-id="4">Set Id=4</button>
<button data-id="3">Set Id=3</button>
<button data-id="*">Show all</button>
</div>

CSS

#form{
  position:absolute;
  top:100px;
}

JavaScript

$('button').on('click',function(){
	//Function for the test
  
	var id=$(this).data('id');
	
	//selector you need
  $('tr').show();
	$("tr[data-id!="+id+"], tr[data-id]:has('input[type=checkbox]:disabled')").hide()
});