In this article, I am sharing with you, how to enable all disabled selected options in select elements using jquery without iteration.
Without chosen-select
$('.select-product').find("option:disabled").prop("disabled",false)
If using chosen-select, using 2nd example
$('.select-product').find("option:disabled").prop("disabled",false).trigger('chosen:updated')
- No need to iterate.
- Use selector
:disabled
to select all disabled - Use
.prop()
to set to enabled