JSFiddle - React, Tailwind, and code Playground

by Laurent Dufour

HTML

<table>
  <tr>
    <td>
      <label for="TEST-B">Portable</label>
      <input type="text" class="field" id="TEST-B" value="">
    </td>
  </tr>
</table>

CSS

.is-moved {
  background-color:red;
}

JavaScript

$( ".field" ).on( "click", function() {
	   $(this).prev().addClass( "is-moved" );
    });