와 두 번째 시간 이후 실패 (가) 다음 코드를 사용하여 프로그래밍 방식으로 상태를 "확인"변경JQuery와 buttonset이 라디오 버튼
<div id="TR1_Mode">
<input type="radio" id="TR1_Mode_Dif" name="TR1_Mode_radio" value="Mode_Dif" ><label for="TR1_Mode_Dif">Differentiation</label>
<input type="radio" id="TR1_Mode_Int" name="TR1_Mode_radio" value="Mode_Int" checked="checked"><label for="TR1_Mode_Int">Integration</label>
</div>
(콘솔에서 시도) :
$('[name="TR1_Mode_radio"][value="Mode_Dif"]').attr("checked", false);
$('[name="TR1_Mode_radio"][value="Mode_Int"]').attr("checked", true);
$('#TR1_Mode').buttonset("refresh");
이 있지만, 반대로 같은 일을 수행 한 후 작동 할 수
:
$('[name="TR1_Mode_radio"][value="Mode_Dif"]').attr("checked", true);
$('[name="TR1_Mode_radio"][value="Mode_Int"]').attr("checked", false);
$('#TR1_Mode').buttonset("refresh");
체크 된 버튼은 선택 취소되지만 체크되지 않은 체크는 선택되지 않습니다. 내가 뭔가를 놓치고 있거나 이것이 jquery에서의 잘못입니까?
체크 버튼이 제대로 작동하는 것처럼 보이지만 동일한 목적을 충분히 채우지는 못합니다.
I TREID이 크롬 (32.0.1700.107 m)와 파이어 폭스 (27.0.1)는, 최신의 jQuery 버전을 시험 사용 : JQuery와-2.0.3.js와 JQuery와 - 1.10.2.js
attr ("checked", false) 대신 removeAttr ("checked")를 시도하십시오. –