JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" value="I'm so alone" />
<table>
    <tr><td><input type="text" value="I'm in a table" /></td></tr>
</table>

CSS

div {
    width: 250px;
    height: 60px;
    background-color: black;
    color: white;
    display: none;
}

JavaScript

$(document).ready(function(){
 $('input,select,textarea').filter(function(i){
   return $(this).closest('table').length === 0
}).attr('disabled', 'disabled');
});