JSFiddle - React, Tailwind, and code Playground
HTML
<input value="">
<input type="submit" value="sq">
JavaScript
$.expr[':'].emptyInput = function (elem) {
return $(elem).is(":input") && $(elem).val() === "";
};
$("[type=submit]").on('click', function () {
console.log($(":emptyInput").length);
});