回答編集履歴
2
誤字修正
test
CHANGED
@@ -73,7 +73,7 @@
|
|
73
73
|
// イベントリスナーの設定(要素が変化した時に、toggleBox関数を実行)
|
74
74
|
radioWrapper.addEventListener('change', toggleBox);
|
75
75
|
|
76
|
-
// 要素のdisplay:block/
|
76
|
+
// 要素のdisplay:block/noneを切り替える関数
|
77
77
|
function toggleBox(event) {
|
78
78
|
// 選択されたラジオボタンのvalueを取得
|
79
79
|
const currentRadioVal = event.target.value;
|
1
id
test
CHANGED
@@ -39,7 +39,7 @@
|
|
39
39
|
- 動作確認用サンプル:https://jsfiddle.net/w6fk4pog/
|
40
40
|
|
41
41
|
```html
|
42
|
-
<div id="radio-box-wrap" class="radio-box-wrap">
|
42
|
+
<div id="radio-box-wrap" class="radio-box-wrap"> <!-- idを追加しました -->
|
43
43
|
<div class="radio-box">
|
44
44
|
<input type="radio" name="boundSelect" value="out" checked="checked" id="outbound">
|
45
45
|
<label for="outbound" class="radio-box__label">下り(京都~大阪)</label>
|