JSFiddle - React, Tailwind, and code Playground
by Peter Jaric
HTML
<input type=text>
<br>
<input type=text value="">
<br>
<input type=text value="value">
<br>
<input type=button value="click me">
JavaScript
$(document).ready(function () {
$('input:button').click(function () {
// What's wrong with this selector? Why does it return the same, no matter
// what you enter in the inputs?
var empty = $('input:text[value=""]');
alert('Number of text inputs with value="": ' + empty.length);
});
});