JSFiddle - React, Tailwind, and code Playground
HTML
<input>
<input>
<input>
JavaScript
$('input').bind('keyup change',function() {
$(this).attr('value',this.value)
console.clear();
console.log( $('input[value=foo]') );
});
<input>
<input>
<input>
$('input').bind('keyup change',function() {
$(this).attr('value',this.value)
console.clear();
console.log( $('input[value=foo]') );
});