Hello, in my multiple option. If i’m already select the option. Could i’m using hidden property for my option. Because right now i’m using disabled for the option if already selected.
function updateSelections(selectedValue) {
$("#multiple_one option[value='" + selectedValue + "']").prop('disabled', true)
$("#multiple_two option[value='" + selectedValue + "']").prop('disabled', true)
}
function updateSelectionsTwo(selectedValue) {
$("#multiple_one option[value='" + selectedValue + "']").prop('disabled', false)
$("#multiple_two option[value='" + selectedValue + "']").prop('disabled', false)
}
I want it will be worked using this
function updateSelections(selectedValue) {
$("#multiple_one option[value='" + selectedValue + "']").prop('hidden', true)
$("#multiple_two option[value='" + selectedValue + "']").prop('hidden', true)
}
function updateSelectionsTwo(selectedValue) {
$("#multiple_one option[value='" + selectedValue + "']").prop('hidden', false)
$("#multiple_two option[value='" + selectedValue + "']").prop('hidden', false)
}
Could select2 handle hidden property in the option?