JSFiddle - React, Tailwind, and code Playground
HTML
<form>
<label>Select This Label</label><input type="text" />
<label>Select This Label</label><input type="email" />
<label>Select This Label Main checkbox group</label><br>
<label>NOT THIS LABEL!</label><input type="checkbox" />
<label>NOT THIS LABEL!</label><input type="radio" />
<label>Select this arbitrary label just hanging out here</label>
</form>
CSS
.someclass{color:red;}
JavaScript
$("form").find("label").each(function(){
if(!($(this).next().is("input[type='radio']") || ($(this).next().is("input[type='checkbox']")))){
$(this).addClass("someclass");
}
});