最近誰かがラジオ ボタンの問題を修正するためにこのコードをくれました。完全に動作しますが、ラジオ ボタンのグループをさらに除外するにはどうすればよいですか?
「lunch_fruitjuice」と「lunch_desserts」も除外したい
$(function(){
// cache the selector for all target radio buttons for later use
var targetRadioButtons = $("input:radio").not("input:radio[name=lunch_desserts]");
targetRadioButtons.change(function(){
var currentGroupName = $(this).prop("name");
// remove selected state from other items
targetRadioButtons.not(this).prop('checked', false);
});
})
ありがとう