Disable Siblings
Disable Siblings
I have this:
<form><div><span><select multiple class="chzn-select">
<option>
<optgroup><option><option> ...
<optgroup><option><option> ...
This select element is being handled by the jQuery plugin Chosen.
When option is selected, I need its siblings to be disabled and the element be rebuilt.
This is my completely ignorant attempt:
$(".chzn-select").chosen().change().siblings().attr('disabled','disabled').trigger('liszt:updated');
"When an element being managed by Chosen is changed, gather the selected option's siblings and give them the disabled attribute, then tell Chosen to update the element."
I know its wrong, but I don't know where to start making it right.