JSFiddle - React, Tailwind, and code Playground

HTML

<input value=""/> <- type "foo" here

JavaScript

$('input').keyup(function(){
    $('input[value=foo]').css('backgroundColor','red');
})