I have a problem that I don't know how to solve.
I have a select in which the first selected option appears by default "Select an option"
<select class="sel">
<option value="" selected>Selecciona una opción</option>
<option value="1">One</option>
<option value="2">Tow</option>
<option value="3">Three</option>
<option value="4">Ford</option>
<option value="5">Five</option>
<option value="6">Six</option>
<option value="7">Seven</option>
<option value="8">echt</option>
<option value="9">nine</option>
<option value="10">then</option>
</select>
What I need is, I don't know how to do it, I imagine it will be a js or JQuery function so that when the select is displayed, this first option of "Select an option" does not appear in the dropdown. With the inputs it is easier since by putting the placeholder the text appears but when putting the focus on said input the text disappears.
Could you help me to know how to make this function to hide this option from the select when it is displayed?
Thank you very much
The solution would be simple: disabled, then it would look like this:
ED: Well, I wouldn't hide it from you, but I wouldn't let you select it.
ED2: Another option, to make it hidden there is also the attribute: hidden
Being in the first place in your example you would not need the selected and you would have something like this:
As they put me in a comment, I would give you a preview of how it would turn out, but I am not very clear on how to do it on this page, sorry for the inconvenience