JSFiddle - React, Tailwind, and code Playground
by JamesKyle
HTML
<select>
<option class="placeholder">Switch Sports</option>
<optgroup label="Select a Sport:">
<option>Basketball</option>
<option>Baseball</option>
</optgroup>
<optgroup label="Unapproved:">
<option>Soccer</option>
</optgroup>
<option>Add another Sport</option>
</select>
JavaScript
var select.placeholder = $('select .placeholder').parentsUntil('select');
if (select.placeholder !== undefined) {
var $this = $(this);
$this.focus(function() {
$this.find('.placeholder').hide();
});
}