JSFiddle - React, Tailwind, and code Playground

by Ahmad SM

HTML

<form name="myform">
<table>
<tr>
<td>
<select name="one" class="combo">
<option value="" selected="selected">Select...</option>
<option value="show">show</option>
<option value="hide">hide</option>
</select>
</td>
<td>
<th style="visibility:hidden;" class='label-isi'>Isi</th>
<th><input type="textbox" name="other" class='input-field' style="visibility:hidden;"/></th>
</td>
</tr>
</table>
</form>

JavaScript

$( ".combo" ).change(function() {
  if($('.combo').val() == 'show'){
  	$('.label-isi').css('visibility', 'visible');
    $('.input-field').css('visibility', 'visible');
  }else{
  	$('.label-isi').css('visibility', 'hidden');
    $('.input-field').css('visibility', 'hidden');
  }
});