jquery multi에서 선택한 항목을 제거하는 방법 재설정 버튼을 클릭 한 후 선택 하시겠습니까?새로 고침 Jquery multi selected 선택
<select data-placeholder="Select" id="options" class="chosen-select" maxwidth="50px" multiple tabindex="15" ></select>
나는 여러 가지 방법으로 운이 좋았습니다. 이미지의 위와 여전히 선택된 디스플레이 항목 후
$("#options").multiselect('refresh');
$("#options").multiselect('clearSelection');
$('#options').multiSelect('deselect_all');
$("#options").find('option:selected').removeAttr("selected");
, 어떤 도움을 주시면 감사하겠습니다
: 이것은 내 코드입니다.
그 스크린 샷은 다중 선택처럼 보이지 않습니다. https://harvesthq.github.io/chosen/) 또는 tagit (http://aehlke.github.io/tag-it/) ... 사용중인 도서관에 대해 100 % 확실합니까? 편집 : 실제로 클래스를 기반으로, 선택한 필드입니다 ...'.chosen()'메서드를 사용하거나 false로 속성을 설정합니다 (예 :'$ ("# options").) find ('option : selected') .prop ('selected', false)'), 단순히 속성을 제거하는 것보다; '$ ("# options"). trigger ('selected : updated'); ' –