jQuery를 사용하여 두 개의 라디오 버튼을 토글하려고합니다. 그러나 그렇게 단순하지는 않습니다. 위의 코드는 작동하지 않는 이유 jQuery로 라디오 버튼 토글
<button id="toggler">click me</button><br>
<input type="radio" name="speeds" value="fast" checked>fast<br>
<input type="radio" name="speeds" value="slow">slow<br>
$('#toggler').click(function() {
$('input[name="speeds"]').each(function(){
$(this).prop("checked", !$(this).prop("checked"));
});
});
는 사람이 설명해 주시겠습니까?