JSFiddle - React, Tailwind, and code Playground
HTML
<select multiple>
<option>One</option>
<option>Two</option>
</select>
JavaScript
$(function() {
if ($("select[multiple]").length) {
alert("worked");
}
if ($("select").attr("multiple")) {
alert("worked");
}
if ($("select").attr("multiple") != 'undefined') {
alert("worked");
}
});