JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" value="111" /><input type="text" value="222" />

CSS

.red { color: red; }

JavaScript

$('input:first')[0].value = '333';

$('input').filter(function(){return this.value=='333';}).addClass('red');