2
I have the following select:
<select id="selectChannel" class="form-control form-control-sm custom-select">
<option value="" disabled="disabled">Selecione o canal</option>
<option value="1" disabled="disabled">Canal 1</option>
<option value="2">Canal 2</option>
<option value="3">Canal 3</option>
<option value="4">Canal 4</option>
</select>
Every time a pewssoa adds some of the channels, I disable it so that it is not possible to add the same channel more than once. When clicked on add, I only execute the following command to disable
$("#selectChannel option:selected").attr('disabled','disabled')
What I need is when the user deletes a channel, the option is available again. I have the information of which channel is being deleted, but how do I enable the option in select?
How do you "delete channel" ? Your code only shows the
select
and the method of disabling it.. You also haven’t explained why you really need to delete the channel and etc, try to make your question as clear as possible.– user148754
"I have the information of which channel is being deleted"... what would that information be? Value?
– Sam